Jump to content
  • Advertisement
Sign in to follow this  
Alastair Gould

OpenGL Best way to use VBO's

This topic is 4208 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

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]

Share this post


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

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!