Archived

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

PSioNiC

I dont get dynamic index buffers

Recommended Posts

PSioNiC    122
ive decided on the dynamic index buffer method (where you have one mother vertex buffer and you copy the vertices that you want from the vertex buffer to the index buffer). I''ve considered these methods: ID3DXMesh::GetVertexBuffer(); ID3DXMesh::GetIndexBuffer(); I can get the data out of those buffers no problem, but the problem is when I want to change them. From what I know about index buffers, it basically says to D3D: "make a triangle out of this vertex, this vertex and this vertex..." With that said, if i just delete a set of 3 indices (which all pretain to the same tri), the triangle will just dissapear right? And if the triangle just dissapears, there will be a bottomless pit in the terrain I dont want that. I want it so that you can just delete a vertex and neibouring triangles fill up the hole. I have read previous posts on this topic, but none of them are talking about how to delete indices out of an index buffer and make the tri''s still line up, they are talking about whether or not this is a good method. Is there an algorythm to do this or am I missing something completely ?

Share this post


Link to post
Share on other sites