Your two code variants are missing the main point: the vertex attribute pointers.
glDraw*
functions do never care what is currently bound at the GL_ARRAY_BUFFER
binding point. What is does care about are the vertex arrays (and, for the glDrawElements*
variants, the currently bound GL_ELEMENT_ARRAY_POINTER
).
What you are currently missing is that the GL_ARRAY_BUFFER
binding is relevant when you set up the vertex attrob pointers (probably via glVertexPointer
in your case). The reference to the VBO bound at setup-time will become part of the pointer.
So, when you really want to draw from different VBOs, you must respecify the attrib pointers (and, for that, also rebind the VBOs). Note that modern GL uses VAOs which encapsulate the vertex array state and allow swithcing between different sets of VA pointers with a single function call.
As a side note: you also don't need to enable and disable those attrib pointers all the time. You can leave it on as long as you don't plan to do any call to glDraw*
without a GL_VERTEX attribute array. As Martijn Courteaux already pointed out, it does not enable or disable VBOs, it just tells the GL for which attributes an array is to be used, and for which it will use the current value (which will be constant for all vertices of the draw call, then).