Best way to use VBO's

Started by
0 comments, last by Krohm 16 years, 10 months ago
Use one big VBO with lots of objects? Use one VBO per object? I hear some people say using one big vbo is best, and I hear people say use smaller vbo's because its best for memory ,cache, and preformance deacreases at anything over 64k batches of triangles. I've heard this from reading over at the openGL.org forum(A 2005 thread). Obvously trying to keep VBO swtiching to a minmium since its a expensive call. Or would using some kind of hybrid, using medium size batch'es, and when theres a need for more than 64k create a new vbo? [Edited by - Alastair Gould on June 2, 2007 10:49:02 AM]
Advertisement
Quote:Original post by Alastair Gould
Use one big VBO with lots of objects?
Use one VBO per object?

Sometimes it makes sense to have a VBO containing a single object: usually this happens for dynamic content or to some special hi-poly meshes. Generally, I would try to use less buffers as possible.
Quote:Original post by Alastair Gould
I hear some people say using one big vbo is best, and I hear people say use smaller vbo's because its best for memory ,cache...
As always, the two extremes are usually far from being optimal. I use 4MB as an upper limit for my static meshes and I don't see any issue with this, people will point you to a different size for different cases.
Quote:Original post by Alastair Gould
...and preformance deacreases at anything over 64k batches of triangles

I've also observed a weird performance decrease with 64k vertices per batch, but it's not VBO's fault and it goes away with 32bit indices.
Quote:Original post by Alastair Gould
Or would using some kind of hybrid, using medium size batch'es, and when theres a need for more than 64k create a new vbo?

Bigger than that. 64k means ~5500 RGB32F vertices - it's very few. I suggest to go at least for a MB.

Previously "Krohm"

This topic is closed to new replies.

Advertisement