Sign in to follow this  
Andreas Persson

Meshes in dx10

Recommended Posts

Hi I am currently developing a framework for dx10 and am about to implement meshes with x files. Is there any documentation for this, all I found was for the sdkmesh format? From what I could see the ID3DX10Mesh interface didn´t have any D3DXLoadMeshFromX function or similar like the dx9 version have.

Share this post


Link to post
Share on other sites
The D3DX library doesn't contain a D3D10-compatible "built-in" mesh class. However, the DXUT SDKMesh class (for which the SDK has the sources) is very similar to D3DXMesh; it encapsulates vertex, index and attribute buffers and provides methods to conveniently manipulate and draw the data stored in those buffers.

I recommend that you study how the SDKMesh ticks, and create your own mesh class for your specific needs. It really isn't as difficult as it may first seem.

Share this post


Link to post
Share on other sites
Convert from a ID3DXMesh to ID3DX10Mesh - use your tried and tested D3DX9 mesh loading and manipulation functions and then copy across the final data to D3D10 for rendering...

D3DX10 is still a bit light on mesh-related routines, so sticking with D3DX9 isn't a bad choice. I posted some manual D3DX10 mesh code here, and I could probably dig up my generic D3DX9->D3DX10 routine later (I'm at work right now).

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
Convert from a ID3DXMesh to ID3DX10Mesh - use your tried and tested D3DX9 mesh loading and manipulation functions and then copy across the final data to D3D10 for rendering...

D3DX10 is still a bit light on mesh-related routines, so sticking with D3DX9 isn't a bad choice. I posted some manual D3DX10 mesh code here, and I could probably dig up my generic D3DX9->D3DX10 routine later (I'm at work right now).

hth
Jack

I can second this approach. Using the DirectX10 mesh stuff as a standalone solution is painful. And don't even think, for a second, about using the CDXUTSDKMesh class for loading a mesh. Not even for a second.

That said, it's a good place to look for ideas and implementation tips (as Nik02 said), but as a single solution it's kind of, uh, ouch.

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