We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1584

Summary: Improved glError checks in the opengl renderer
Product: SDL Reporter: Martin Gerhardy <martin.gerhardy>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.0   
Hardware: All   
OS: All   
Attachments: the patch

Description Martin Gerhardy 2012-08-27 02:42:25 UTC
I've extended the gl error checks.

This is needed because on my system there are errors in the renderer that are hard to find.

Also glError can return multiple errors. Even if SDL_SetError would only contain the last one of course, the SDL log facilities are able to get the output for each error.
Comment 1 Martin Gerhardy 2012-08-27 02:43:09 UTC
Maybe the GL_CheckError stuff should go into a header that can be shared between the opengl, opengles and opengles2 renderers?
Comment 2 Martin Gerhardy 2012-08-27 07:32:52 UTC
Created attachment 940 [details]
the patch
Comment 3 Sam Lantinga 2012-09-28 03:50:54 UTC
Your patch has been massaged and applied, and it caught an error in the OpenGL viewport code.
http://hg.libsdl.org/SDL/rev/309599be5c2a

Thanks!

It may be worth extending this to the OpenGL ES renderers.  Feel free to reopen this bug and add a patch if you think it's worth it.