By no means you need to recreate the buffers every time. Why don't you create all your buttons once and then draw them as needed? Buttons are immutable things.
Suppose you had a class Button, that incorporates all the stuff needed to draw a button, such as textures and the vertex buffer:
class Button {
Texture texture;
VertexBuffer buttonVerts;
...
// draw this button using OpenGL.
void draw(float x, float y);
// load a file that describes this button's layout.
// also loads texture and creates the vertex/index buffers.
void init(string filename);
}
You only need to create your button "templates" once, and then every menu can share them. Supposing each button can be loaded from a file that describes its layout:
Button pushButton = new Button();
pushButton.init("push_btn.xml");
Button radioButton = new Button();
radioButton.init("radio_btn.xnl");
etc ...
That only have to be done once. Then you just distribute them to the menus:
// Menu with 2 push-buttons and a radio-button
Menu menu1 = new Menu();
menu1.addButton(pushButton);
menu1.addButton(pushButton);
menu1.addButton(radioButton);
And when the menu is drawn, all you will have to do is iterate the menu buttons and draw them:
function Menu.draw()
{
// draw the menu background, etc...
// now draw each button:
for each Button btn in menuButtons
{
btn.draw(pos.x, pos.y);
}
}
EDIT:
So, initially I misunderstood the difficulty the OP was having. The issue was how to pack all vertexes pertaining the buttons in a single VBO and draw them separately.
For indexed geometry, a good option would be to use glDrawElementsBaseVertex, which allows the specification of a vertex offset (basevertex) of where to start drawing.
For unindexed geometry (raw triangles and triangle-strips/fans), the approach is even simpler. glDrawArrays takes a first parameter which is the initial vertex to start drawing from. So the drawing of a button would become something in the lines of:
GLint firstBtnVertex = (vertsPerButton * buttonIndexInVBO);
glDrawArrays(GL_TRIANGLES, firstBtnVertex, vertsPerButton);