I don't really understand what's going on in my code so I figured I would throw this out here.
I've created a mesh to represent some terrain ... it's 128x128 quads. So that's 32,768 triangles.
I have an interface written so that I can "draw" on this mesh and move its vertices up or down to create a heightmap.
I keep track of which vertices are changing each paint operation and I affect those vertices with the "VertexCoords" command.
My problem is that this is pretty sluggish on any heightmap over 32x32. 64x64 is chuggy and 128x128 is approaching unusable. I'm only modifying 40-50 vertices per operation so I don't think that's asking too much.
Is there some "Lock" I should be doing before modifying the mesh? Is there some way to store the mesh in different memory so it uploads faster each time I edit it?
Any other ideas? I've optimized everything to use the fewest number of vertices possible, single surface, etc.
I don't see a way to make this any faster at the moment and that disturbs me.
I've created a mesh to represent some terrain ... it's 128x128 quads. So that's 32,768 triangles.
I have an interface written so that I can "draw" on this mesh and move its vertices up or down to create a heightmap.
I keep track of which vertices are changing each paint operation and I affect those vertices with the "VertexCoords" command.
My problem is that this is pretty sluggish on any heightmap over 32x32. 64x64 is chuggy and 128x128 is approaching unusable. I'm only modifying 40-50 vertices per operation so I don't think that's asking too much.
Is there some "Lock" I should be doing before modifying the mesh? Is there some way to store the mesh in different memory so it uploads faster each time I edit it?
Any other ideas? I've optimized everything to use the fewest number of vertices possible, single surface, etc.
I don't see a way to make this any faster at the moment and that disturbs me.