Reputation: 13000
I store my model data in VBO/IBOs and render them using VAOs, which I understand is pretty much how it's normally done.
But I have non-model quads that are generated for 2D sprites and GUI, that consist of only 4 vertices. The position of these quads is rarely the same (unless it's part of the GUI), and the UV coordinates change every frame as well. Additionally, there are a large amount on screen at any one time, at least over a thousand.
I'm wondering, what is the best way to transmit single quads to the GPU and render them?
Assigning each a VBO feels like overkill, and clumping them into a single new VBO created/destroyed each frame, equally seems extreme. But the only other way I could think of is to use Immediate Mode, which I've been avoiding since it's depreciated.
Upvotes: 0
Views: 168
Reputation: 26
You can definitely put all your quads into a single vbo and draw just one when you want to. Having one vbo per rectangle is unnecessary overkill.
Upvotes: 1