Multiple VBs or One

Started by
2 comments, last by jollyjeffers 15 years, 4 months ago
I have all of my vertex data for a model in lots of frames, would it be better to have a vertex buffers for each frame or 1 vertex bugger and load the vertices in every time the frame changes? They both seem to have their advantages and disadvantages to me :( [Edited by - MrPickle on December 15, 2008 2:20:01 PM]
Here to learn :)
Advertisement
I think you want to minimize vertex buffer changes - when possible. When you change vertex buffers you force the pipeline to sync. If you do a ton of this then performance will suffer.

That being said, if you are just starting out then you are probably a long way from having this be your bottleneck.

I have 6-7 vertex buffers - generally one for every type of rendering output (terrain, particle effects, skined animation, HUD elements, etc...)

Hope that helps!
My Apps:Putt Nutz
Okay, I will have one VB then, thank you.
Here to learn :)
Two additional comments:

1. Minimize resource modification wherever possible. Generally speaking this is slow and you shouldn't do it within the main rendering loop.

2. If you must do lots of resource modification then having many splaying your data across multiple buffers can be a good thing. This allows you to acquire a write lock on a single buffer without blocking the GPU from rendering all of the others.


hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement