Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glVertexAttribPointer() assumes non-default VAO #67

Open
tksuoran opened this issue May 24, 2019 · 1 comment
Open

glVertexAttribPointer() assumes non-default VAO #67

tksuoran opened this issue May 24, 2019 · 1 comment

Comments

@tksuoran
Copy link

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).

@oddhack
Copy link
Contributor

oddhack commented Nov 3, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants