Glvertexpointer Buffer


Let’s get straight to the point, the last arguement in glvertexpointer is the coord of the first vertex of the model
the coord is located in a buffer, how will i access that buffer and retrieve that coord?

If you are using VBO, then you can map the buffer with glMapBuffer.
If you aren’t using VBO, then call glGetPointerv :

float *pointer;
glGetPointerv(GL_VERTEX_ARRAY_POINTER, &pointer);

If you want to read back from a VBO to system memory then you’re going to incur substantial performance penalties due to pipeline stalls. Maybe you better say what it is that you’re trying to accomplish as there will likely be much better options available.

On the GPU in a shader? Or on the CPU? Your question is a bit vague.

Also, do you have a particular version of OpenGL you’re targetting? E.g. 4.2 core, 3.3 compatibility, 2.1, etc?