Archived

This topic is now archived and is closed to further replies.

Mesh Vertex Manipulation

This topic is 5148 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''ve been experimenting for a few days now on manually tweaking vertices within a mesh, loaded in from an X file. I can''t seem to find any good information on doing this, currently I''m locking it and can get a VOID* pointer to the data, then unlock it. I see that you can acquire the FVF from the mesh object, however, how do you know what this FVF contains? Lets say I wanted to get vertex 1 2 3 (for example), how do I retrieve such information from the mesh, including things like position, colour, what have you etc? All assistance would very much be appreciated, Ratamahatta

Share this post


Link to post
Share on other sites
There used to be something like:

D3DXMeshVertexBuffer8SetData

and

D3DXMeshVertexBuffer8GetData

use it like this:

hResult = D3DXMeshVertexBuffer8SetData(kfCurrent.Mesh, 0, Len(kfCurrent.VertexList(0)) * kfCurrent.Mesh.GetNumVertices, 0, kfCurrent.VertexList(0))

Oh, btw: I think this method is surprisingly slow...





Share this post


Link to post
Share on other sites