Jump to content
  • Advertisement
Sign in to follow this  
chillypacman

How do I resize the vertex buffer of an ID3DXMesh?

This topic is 3216 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

If I have an ID3DXMesh object I can get its buffer by calling LockVertexBuffer() on it, is it possible to increase the buffer size? I don't mean to change its vertex declaration, just increase the number of vertices it has.

Share this post


Link to post
Share on other sites
Advertisement
You can't resize a vertex buffer, only re-create it. And as far as I know, you can't set a vertex buffer of an ID3DXMesh.

So no, it's not possible.

Share this post


Link to post
Share on other sites
You can create a mesh of the size you require using D3DXCreateMesh(). Then you would just copy over the vertices from the existing mesh.

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!