The gl*Pointer set of routines registers a data block which already contains the data for a vertex attribute. This can be a:
- A CPU-pointer to a memory block in your application's memory space (in the compatibility profile), OR
- An offset into the VBO (vertex buffer object) bound to the GL_ARRAY_BUFFER bind point with glBindBuffer.
If you choose option 2, then you need to have created, populated, and bound a buffer object already containing the data to the GL_ARRAY_BUFFER bind point. You'd create and populate it with glGenBuffers and glBufferData.
glVertexPointer = Register a data block to be read in the next Draw call for vertex position data (legacy attribute)
glColorPointer = Register a data block to read in the next Draw call for color value data (legacy attribute)
...
glVertexAttribPointer = Register a data block to be read in the next Draw call for generic vertex attribute #N
glGenBuffers = Create one or more buffer object handles
glBufferData = Allocate and fill the contents of a buffer object
glBufferSubData = Fill the contents of a buffer object (no allocation)