Think of using this "design" more so from a software standpoint than a game and I hope it makes more sense.
I've been currently dabbling in OpenTK/OpenGL. I've created a class that represents a 2d rectangle, it is called a button. So, when a user instantiates a button, they can define any top/left/width/height locations and also a color. These can be changed at any time, so for my very first initial test, I just used the normal glBegin ... glEnd methods to render each button. For now it works, however I am not satisfied.
So I started reading/testing stuff about VBO's. From what I understand we don't want to make a VBO per object, so the idea of making 1 VBO per button is not ideal. This is the easiest start of VBO's for me though. I already did this as a quick test and it seemed to help performance a little bit, although I am still very underwhelmed. I understand that the constant switching of the binding buffer "per object" is the biggest downfall of this implementation.
Now that leaves me with an understanding that we should minimize the number of VBO's in total so the amount of switching the binding buffers is minimal. The understanding of this is what escapes me...
Buttons are just a start and they are predefined with 4 vertices (an array[3] of vertex - another quick class that holds x, y, z floats). The plan is too keep adding more classes that users can use (labels, lists, etc). These can then drawn in any fashion, not being forced into only 4 vertices "per control"...
I was thinking that anything with 4 vertices would go in 1 VBO, anything with 5 vertices in another, and so on... This way we only make new VBO's when they are needed, otherwise if something can fit into an already made VBO, we can add it there.
So, if someone renders a test of 100 buttons and 1 triangle, I will need 2 VBO's (100 buttons in 1 VBO and 1 triangle in the other VBO). Then the calls to draw 101 total objects is only 2 (1 per VBO).
Does this sound reasonable with how VBO's work? Or is there something else I should know or be doing?
P.S. - "Buttons" are my first class to me made, and there will exist both 2d and 3d stuff...