From: Imre Deak Date: Wed, 16 May 2012 11:19:59 +0000 (+0300) Subject: don't call glGetError if there is no active context X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=5979dac09ce1f186b230ffc1b613afb7af90fece;p=apitrace don't call glGetError if there is no active context Signed-off-by: Imre Deak --- diff --git a/retrace/glretrace.py b/retrace/glretrace.py index 32d6a63..e2ea320 100644 --- a/retrace/glretrace.py +++ b/retrace/glretrace.py @@ -363,7 +363,7 @@ class GlRetracer(Retracer): # Error checking if function.name.startswith('gl'): # glGetError is not allowed inside glBegin/glEnd - print ' if (retrace::debug && !glretrace::insideGlBeginEnd) {' + print ' if (retrace::debug && !glretrace::insideGlBeginEnd && glretrace::getCurrentContext()) {' print ' glretrace::checkGlError(call);' if function.name in ('glProgramStringARB', 'glProgramStringNV'): print r' GLint error_position = -1;'