Skip to content
This repository

False internal OpenGL errors #340

danijar opened this Issue · 4 comments

4 participants

Danijar Hafner Qix Mario Liebisch Laurent Gomila
Danijar Hafner

The function "glCheck()" is used after each internal OpenGL call. But if the user uses it's own OpenGL calls, the error checking can fire false positives. For example when the user produces an OpenGL error but didn't fetch it, the at SFML's next OpenGL call "glCheck()" will print in error, which actually isn't located at that file.

Maybe it can be fixed by checking for OpenGL errors before each batch of internal OpenGL calls and if positive, tell the user something like "There was an OpenGL error caused by the user". (By user I mean the developer who uses the SFML framework)


. . . used after each internet OpenGL . . .

Danijar Hafner

Thanks, I corrected the typo.

Mario Liebisch

As with saving/restoring context settings, I don't think this should happen by default, because it will add additional overhead for people not using custom calls or doing proper error checking. On the other side, I could imagine some cleanup such as this in PopGLStates() (maybe optional).

Laurent Gomila

It can (and should) definitely happen in pushGLStates(), since this function is supposed to be called whenever user switches from custom OpenGL to SFML.

Performance is not a concern, these checks are only done in debug mode.

Laurent Gomila LaurentGomila referenced this issue from a commit
Laurent Gomila Checking errors in RenderTarget::pushGLStates() to avoid generating f…
…alse error messages when user leaves unchecked OpenGL errors (#340)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.