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

glDrawElements clarification #52

Closed
codecat opened this issue Apr 26, 2016 · 2 comments
Closed

glDrawElements clarification #52

codecat opened this issue Apr 26, 2016 · 2 comments

Comments

@codecat
Copy link

codecat commented Apr 26, 2016

So I just ran into an issue similar to this: https://stackoverflow.com/questions/23026612/gldrawelements-crash-opengl-3-2-windows-7

Perhaps it's worth noting that if you bind GL_ELEMENT_ARRAY_BUFFER before binding a VAO, it will use the (null) element buffer currently bound to an (empty) VAO. Just my 2 cents.

@Overv
Copy link
Owner

Overv commented Apr 26, 2016

I admit that the placement of the section is a bit unfortunate, but the VAO section already mentions:

Since only calls after binding a VAO stick to it, make sure that you've created and bound the VAO at the start of your program.

I've changed it to be highlighted as a warning and added an extra sentence:

Since only calls after binding a VAO stick to it, make sure that you've created and bound the VAO at the start of your program. Any vertex buffers and element buffers bound before it will be ignored.

See https://open.gl/drawing

@codecat
Copy link
Author

codecat commented Apr 26, 2016

Looks good! 👍

@codecat codecat closed this as completed Apr 26, 2016
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