Currently, I have a collection of RenderObject
classes which contains a texture, a VAO and a VBO. Drawing thousands of these objects incurs a performance penalty due to all the state switching and calls to glDrawArrays
with small numbers of triangles.
So now I'm going to change my implementation so that I create a series of 1MiB VBOs (start with one, once it gets full, create a second 1MiB VBO and continue to fill that). Do I need a separate VAO for each VBO? The VBO already uses interleaved vertex data, so I'm not talking about using multiple VBOs for vertices, normals, texture coords, etc.