gchewood, why you are creating such massive vertex buffer?
vb=new DynamicVertexBuffer(GraphicsDevice, VertexPositionNormalTexture.VertexDeclaration, vertices.Length*100, BufferUsage.WriteOnly);
I thought you said your mesh is 10,000 vertices, doesn't it mean you're creating 1,000,000 vertex buffer here? I wonder if this can cause FPS drop.
No, sorry. That's my mistake for not making it clear. The vertex buffer is around 20,000 vertices as the array 'vertices' at that point is of size 200. It's that size as that's around the maximum it will need to be.
Hi.
Looks like it's time to see your create mesh function.
may be lots of duplicated vertices.
no index buffer.
Hmmmm, ok. This is a potential problem. Just checked the index buffer for when I'm up to about 10,000 vertices. The index buffer is at about 200,000.
Right.
So that seems problematic.
Yep, the issue is with the code I'm using the create the base vertex and index arrays. They're being extracted from a .X model. I just checked, the vertices, normals and texture coordinates are all fine. But it's just creating a hideous number of indices for some reason. Right, at least I know where the issue is. I'm glad my intuition was right.
Thanks for all of the help, given my very vaguely described problem everyone. If anyone has ever extracted the index data from a model in xna before, please post with any info. Otherwise, I'm sure I'll figure it out.
Thanks