OpenGL-Refpages icon indicating copy to clipboard operation
OpenGL-Refpages copied to clipboard

glVertexAttribPointer() assumes non-default VAO

Open tksuoran opened this issue 6 years ago • 1 comments

The following text is misleading, because it assumes non-default VAO is bound, and makes it impossible to figure out how to use client side data (compatibility profile).

If pointer is not NULL, a non-zero named buffer object must be bound to the GL_ARRAY_BUFFER target (see glBindBuffer), otherwise an error is generated. pointer is treated as a byte offset into the buffer object's data store. The buffer object binding (GL_ARRAY_BUFFER_BINDING) is saved as generic vertex attribute array state (GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) for index index.

I understand that this is only for legacy use, but IMHO also the compatibility profile should be covered by the reference pages.

Even the specification itself is a bit confusing, because it gives impression that using null pointer is somehow allowed. I suppose null pointer is allowed only so that it is possible to restore default GL state (and to make the default GL state "valid", even though you cannot use the null pointer).

tksuoran avatar May 24 '19 07:05 tksuoran

We don't have the cycles free to support all the compatibility-mode stuff in the current refpages - it would be a huge amount of work. The index to the gl4 refpages does point people to the old 2.1 refpages for compatibility stuff, although that's easy to overlook. If you wanted to propose a PR to this specific page adding a note about compatibility-mode interactions, that would be great. Otherwise, it is doubtful anything will be done about this.

oddhack avatar Nov 03 '19 12:11 oddhack