Sign in to follow this  

(RESOLVED) DX8, loading a vertex buffer into a D3DXmesh

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

How would I go about loading a vertex buffer into a d3dx mesh object? *Edit* I have already made the vertexbuffer I would like to move it into the mesh object. (or if possibly could I simply load my data into the mesh's vertex buffer?) [Edited by - SquareDanceSteve on January 9, 2006 3:31:48 PM]

Share this post


Link to post
Share on other sites
Take a look at ID3DXMesh::GetVertexBuffer and ID3DXMesh::GetIndexBuffer. Those will give you the respective buffers, so you can lock them and modify them like normal.

One thing though - when you create the mesh using D3DXCreateMesh(), make sure that you already know how many vertices and faces you will need, since D3DX needs to allocate the buffer data ahead of time.

Share this post


Link to post
Share on other sites

This topic is 4358 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.

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