Multiple VBs or One
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]
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!
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!
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement