I have seen a lot of information about reducing the calls to openGL, but I don't understand the pipeline well enough. Can you set up the VBO completely head of time? Specifically using this example, it sets up the VBO and then each frame calls the enabling/pointer setup prior to the draw call. Can the VBO be completely set up with the enabling/pointer setup when it is created?

Generate and bind the array buffer first in the init func, then whichever vertex or element buffers you bind from then on become associated with the array buffer. Unbind the array buffer when you're done. Then to use the array buffer, automatically setting up the pointers, just bind the array buffer.
–
RobinsonApr 9 '12 at 15:42

1 Answer
1

None of the attribute enables and gl*Pointer calls modify the buffer object itself. You don't tell the buffer object that it's being used for positions and normals. Think of the buffer object as nothing more than a dumb byte array.

The gl*Pointer calls tell OpenGL how to interpret that byte array. They are not attached to a buffer. They don't modify the buffer. They simply tell OpenGL where to find certain data within a particular buffer.