Sign in to follow this  
MrPickle

Multiple VBs or One

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this