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 - Improved glError checks in the opengl renderer
Summary: Improved glError checks in the opengl renderer
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.0
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-27 02:42 UTC by Martin Gerhardy
Modified: 2012-09-28 03:50 UTC (History)
0 users

See Also:


Attachments
the patch (11.45 KB, patch)
2012-08-27 07:32 UTC, Martin Gerhardy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.