Jump to content
Site Stability Read more... ×
  • Advertisement
Sign in to follow this  

Adding subsets to ID3DXMesh

This topic is 2858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I get a bunch of vertex data from a file and wish to add it to a LPD3DXMESH.



I guess the LPD3DXMESH has a member LPDIRECT3DVERTEXBUFFER9, and calling pMesh->LockVertexBuffer would be the same as calling pVertexBuffer->Lock, as it is a wrapper.

But I only know how to copy over a bunch of vertex data, I don't quite know how that is devided up into SubSets. I guess it could be some indexing attributes, but I dont think such data is available.

Here is the deal, the file I load has a block of vertex data, then some DDS images and then another block of vertex data. I could just put each block in their own vertex buffers and wrap around them, but I would much rather just stick with the one ID3DXMesh and have the blocks organized as subsets (as they are probably intended to do).

So, after some hours googling I have not yet found how I can make subsets in a blank LPD3DXMESH and copy vertex data into each subset, can you help?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!