[QUOTE=ionas_;1281370]in the notes section it says:
The state returned is retrieved from the currently bound vertex array object.
The initial value for each pointer is 0.
isn’t it supposed to return the address of the specified generic vertex attribute pointer?[/QUOTE]
It does. It returns exactly what you set.
You call glVertexAttribPointer, which is a function that takes a pointer. glGetVertexAttribPointer returns the pointer you set with the first call.
Now you will probably say, “Wait! glVertexAttribPointer doesn’t take a pointer; it takes an offset into a buffer object.” Yes, kinda. But OpenGL pretends that this offset is the value of a pointer. Therefore, glGetVertexAttribPointer returns the pointer value set by glVertexAttribPointer, even though it’s not actually a pointer.
If you want to access data in a buffer object, you use the standard tools for accessing data in a buffer object. Namely, must use map the buffer or use glGetBufferSubData. Just because the buffer object is used for vertex data does not make it special.
[/QUOTE]
Yes, roughly. The above assumes that the buffer holding the attribute data is already bound to GL_ARRAY_BUFFER. A slightly more thorough version might use glGetVertexAttribIuiv(GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) to obtain the buffer name then bind it (or use glGetNamedBufferSubData()).
Beyond that, it’s generally better to keep track of this information yourself than to use glGet* to retrieve it from OpenGL.