Sign in to follow this  
parnell

DX mesh or indexed primitives

Recommended Posts

I was going to write my own engine, simple at first and add implementations of features as needed. Currently i'm just making a 3d version of an old school 2d game so i don't need much... anyhow, does anyone actually use the mesh functionality of directx? Meshes, progressive meshes, etc? or is it usually more standard to write your own mesh object using primitives? I've never seen anyone use .x files either... so if they are using mesh... do they just load from index/vertex buffers from custom files? I'm mainly drawing my obersvations from axiom and irrlicht, which i've been pouring through... can't see anywhere in their DX renderers that they use meshes.

Share this post


Link to post
Share on other sites
Yes, the D3DXMESH class is a great class primarily for one reason -- it has explicit access to the hardware's vertex cache size and can optimize (re-order) the index list to maximize post-transformed vertex cache hits (re-usage). This sole feature in and of itself is huge!

You don't need to use .X files to use the D3DXMESH class. You can create a D3DXMESH and lock its vertex and index buffers manually to load your own data into them. It's what I do, and I've had great success with it. All of our geometric data is optimized at load time specifically for the card that it's running on.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this