Original Post
Hello you!
As i'm slowly moving closer to a good understanding of Vertex Buffer Objects, i stumbled upon a question.
Consider this; You have many objects (minimum 10, and maximum 10000) in a 2D space. The objects are all just textured cubes, but with various sizes. They all need to have their position updated every frame. What would be the best way to draw these objects using VBOs?
Currently i have one tiny littly VBO at a default size. I then draw this VBO once per object, but translating, scaleing and changing texture as we go. This is of course a huge performance boost compared to simple immediate mode, but i'm still sending more calls to the GPU then i perhaps need too. What if i would setup one big dynamic VBO, that contains all my objects and updates every frame? I could store the textures in a texture atlas (That's what they are called, i belive) and i've all of the sudden reduced the number of calls i make to... well alot less.
So my question to you is; Is the performance hit from using a dynamic VBO more worth it then doing what i'm currently doing?
Thanks for your time! :)
As i'm slowly moving closer to a good understanding of Vertex Buffer Objects, i stumbled upon a question.
Consider this; You have many objects (minimum 10, and maximum 10000) in a 2D space. The objects are all just textured cubes, but with various sizes. They all need to have their position updated every frame. What would be the best way to draw these objects using VBOs?
Currently i have one tiny littly VBO at a default size. I then draw this VBO once per object, but translating, scaleing and changing texture as we go. This is of course a huge performance boost compared to simple immediate mode, but i'm still sending more calls to the GPU then i perhaps need too. What if i would setup one big dynamic VBO, that contains all my objects and updates every frame? I could store the textures in a texture atlas (That's what they are called, i belive) and i've all of the sudden reduced the number of calls i make to... well alot less.
So my question to you is; Is the performance hit from using a dynamic VBO more worth it then doing what i'm currently doing?
Thanks for your time! :)