FatalCatharsis
FatalCatharsis

Reputation: 3567

efficiency and usage of dynamic vertex buffers in d3d

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?

Upvotes: 0

Views: 1382

Answers (1)

Jeff
Jeff

Reputation: 175

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.

Upvotes: 1

Related Questions