X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fglretrace.py;h=6fdeffe49eaa8c14ed2cedcb820344679d271216;hb=7a9fb5103e052150232b64cb5d99374cda3f1234;hp=32d6a63e95b2108fa21f11e36d5c588a06630dd9;hpb=04f42b803c60b593359322b80af4003361ccd097;p=apitrace diff --git a/retrace/glretrace.py b/retrace/glretrace.py index 32d6a63..6fdeffe 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;' @@ -528,7 +528,8 @@ if __name__ == '__main__': static bool _pipelineHasBeenBound = false; ''' - api = glapi.glapi - api.addApi(glesapi.glesapi) + api = stdapi.API() + api.addModule(glapi.glapi) + api.addModule(glesapi.glesapi) retracer = GlRetracer() retracer.retraceApi(api)