The specification for the glVertexAttribPointer
is as follows:
void glVertexAttribPointer( GLuint index,
GLint size,
GLenum type,
GLbool
Legacy.
That argument had a different meaning before VBOs: you'd keep the vertex data in client memory and pass the address of the array (see glEnableClientState and such).
Now the last parameter can have 2 meanings (offset for buffer objects, address for client state arrays). Khronos did not provide a separate version for gl*Pointer
functions for buffer objects, so you need to do this awkward cast.