VBO arrays and index arrays

Is there a way for a single one VBO to store both vertex arrays and index arrays ?

From within the specs I could understand there aren’t but maybe I missed something.

I am not sure if it is possible, but is there any reason you would want to? (I cannot think of any advantages…)

The only reason is that I would have liked to avoid binding VBO twice more. Am I not obliged to bind them each time I swap from an array buffer to an element array buffer ?

Not sure I understand, vertex arrays and element arrays have different binding points.

eg.

glBindBuffer(GL_ARRAY_BUFFER, vertexVBO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexVBO);

//Setup vertex pointers

//Draw with index and vertex VBO

Anyway, binding a VBO is intended to be a lightweight operation.

Okay, I didn’t understood this point like that. Thanks.