-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
GL ELEMENT_ARRAY_BUFFER_BINDING issue not working for VAO == 0 #3194
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi
Thank you for the proposed fix.
Can you explain what problem you discovered and if possible share a program that recreates the problem?
Looking at the GL spec the implemented behaviour looks correct, an array
value of zero should break the current VAO binding i.e.
glBindVertexArray binds the vertex array object with name array. array is the name of a vertex array object previously returned from a call to glGenVertexArrays, or zero to break the existing vertex array object binding.
It is an issue I have encountered some time ago while working on app I cannot share. I haven't looked into spec, but it seems like VAO == 0 had some data bound. Without this fix, some geometry was not rendered at all. |
Thank you for explaining your use case. Not a problem about not being able to share the application. |
I'm almost sure it was GL 4.6 Compatibility |
GL Compatibility makes sense : the behaviour of the implementation needs to be different when capturing GL Core or not. GL Core behaves as the code is currently and for GLES & Compatibility it needs to be changed to something like you have in this PR. |
Sure. So, does the fix fit here? Renderdoc supports GL core mainly, right? |
I was thinking about this and this would be easier if there was an issue i.e. bug report which would give a reproduction case to work through. I would say we need to keep the previous and the new code but with an if test. The if test should only use the old code on a core profile (or the if test can be inverted and use the new code for GLES and Compatibility) I think it would be useful to have a GL test program that uses this feature and the GL test program can run in Core or Compatibility mode to show the two different code paths, ideally there would also be a GLES test program. I don't think there is a major rush on this change (as there is no bug report to work from). |
I have been investigating to find a way to do this without an if test, which should be possible. I have been using the gl_vao_0 test program, however so far I have not been able to create any problems when calling If you were able to start from that test program (or a different reproduction project) to create a capture that does not replay correctly then we can move forward with the PR to identify and understand the problem and be able to verify the required fix. |
Hi Closing the PR as it has been a month without any replies. |
For array == 0 previous value should be restored instead of NULL assignment.