• Advertisement
Sign in to follow this  

Vertex Buffer Object question

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

Do you think having a single vertex buffer object class for all the shape/mesh/models is better than having more than one each? If you don't get it, I'll try to explain it. Example: I have a triangle shape. I call vbotriangle->create(); to create the vbo for that certain shape then call another for another example for mesh, vbomesh->create() to create for that certain shape. Is better than, For all the triangle,mesh and etc, I have only 1 class vbo so it means all the information for all the mesh and triangle is stored in a single class so if I call the draw function, it will draw everything with just a single call. So which one is better? Hope you understand. DarkBalls [Edited by - DarkBalls on April 21, 2009 1:54:26 PM]

Share this post


Link to post
Share on other sites
Advertisement
Generally, you want to try to have as few VBOs as possible--but sometimes this isn't practical.

-Static objects should be drawn as one VBO; not many (like one for each tri).

-If you want to change an object, you can use a dynamic VBO, updating as many triangles as you want.

-If you have many static objects that are just moving relative to each other, you likely want a separate VBO for each to avoid the overhead of updating a single big VBO that groups all the objects together.

Share this post


Link to post
Share on other sites
I'm creating a 3d game engine so what should I do? Should I separate it for easy organization over speed?

Share this post


Link to post
Share on other sites
It depends on the level of abstraction. You can decide not to export a BVO interface at all. Just let the user create a shape. The engine internally takes care of sorting the geometry into a VBO where the data fits.

Do not create a single VBO for each shape. Switching VBO means overhead you do not want to have. But also do not just use one big VBO since this makes it slow for the driver to move the VBO in memory when necessary.

You should try googling for optimal VBO size in MB there should be some information available.

Share this post


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

  • Advertisement