#1011: [Patch] Unified OpenGL error checking
------------------------------+---------------------------------------------
Reporter: cybersphinx | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: unspecified
Component: Engine: Graphics | Version: svn/2.2
Keywords: | Operating_system: All/Non-Specific
Blockedby: | Blocking:
------------------------------+---------------------------------------------
Since our current use of glGetError was not always right (the manpage says
it has to be called in a loop to clear all error codes) I converted a
macro Per made into a bool function returning true when an error was
found, plus a helper macro that inserts function, file and line number of
the call.
The glErrors() function is now the only place where glGetError is called,
I've replaced all other calls with it.
For Buginator's FBO hack, I've also removed checkGLErrors (which, contrary
to its name, checked only one error) and call glErrors instead (are all
those actually useful?). The messages checkGLErrors printed are lost now,
but I don't think it was that helpful; to debug such an error, you need to
look at the code anyway to see where the specific message came from, and
file/line number should do the job at least as well.
(To provoke an error for testing: glGetString(-1) gives an invalid enum)
--
Ticket URL: <http://developer.wz2100.net/ticket/1011>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Resurrection Project
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev