Sign in to follow this  

Multiple VBs or One

This topic is 3319 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this