0
votes

i submitted a question that was actually a bunch of questions in one, so i'm splitting them into their own separate questions, as requested.

i've read about and used dynamic vertex buffers, and manipulated them at runtime, etc. I've been told however, to keep dynamic vertex buffers to an absolute minimum, as they tend to bog down performance much more than static buffers. I've also read that rather than locking and unlocking constantly to write just a couple polygons, using dynamic buffers allows you to lump a great sum of vertices into one buffer and send them off in one go, which apparently improves performance. I'm probably going to like to be able to manipulate most of the objects in the scene constantly, ( not just by rotation or scale but by individual vertex position, etc), so is there some way to have a dynamic buffer that you only have to update or change when you have to, but otherwise does not have to be rewritten every frame?

1
What do you want to do with you vertices? Update them base on some stream data? Maybe you can try staging buffers. - BlueWanderer
occasionally change there position through out the lifetime of the application and add vertices as the camera approaches the side of the map. (i havn't even remotely attempted it, but this is to get a background on what procedural terrain might entail). - FatalCatharsis
You can give it a test by modifying any sample in the SDK, and see if you have to upload the buffer every frame (I guess not). I found you are playing with D3D9, and I'm not familiar with it... - BlueWanderer

1 Answers

1
votes

The dynamic buffer does not require a rewrite everyframe, it is just more accessible to CPU than GPU for ease of updates. For less frequent updates, you can use static which is more accessible to the GPU for faster rendering, then use UpdateSubResource to edit just a range of vertices as needed.