From: <dc...@us...> - 2014-01-22 10:10:02
|
Revision: 1641 http://sourceforge.net/p/freeglut/code/1641 Author: dcnieho Date: 2014-01-22 10:09:57 +0000 (Wed, 22 Jan 2014) Log Message: ----------- implement handling of GLDebugSwitch: we use glutReportErrors to check for errors in each iteration of the glut mainloop if requested Modified Paths: -------------- trunk/freeglut/freeglut/src/fg_main.c Modified: trunk/freeglut/freeglut/src/fg_main.c =================================================================== --- trunk/freeglut/freeglut/src/fg_main.c 2014-01-21 10:52:53 UTC (rev 1640) +++ trunk/freeglut/freeglut/src/fg_main.c 2014-01-22 10:09:57 UTC (rev 1641) @@ -465,6 +465,13 @@ /* Perform work on the window (position, reshape, display, etc) */ fghProcessWork( ); + /* Check OpenGL error state if requested. + * Don't call if no more open windows (can happen if user closes window from + * title bar), would lead to infinite error loop in glutReportErrors + */ + if (fgState.GLDebugSwitch && fgStructure.CurrentWindow) + glutReportErrors( ); + fgCloseWindows( ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |