]> git.cworth.org Git - apitrace/commitdiff
Allow to do GLlocation mapping in more places.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 9 May 2011 08:10:18 +0000 (09:10 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 9 May 2011 08:10:18 +0000 (09:10 +0100)
glretrace.py

index e6cf6319394e1b94c52e5cdb3b299e29c4b489f7..101ca081e245457a21d3361a8df21224287453f9 100644 (file)
@@ -167,9 +167,10 @@ class GlRetracer(Retracer):
             print '    %s = %s.blob();' % (lvalue, rvalue)
             return
 
-        if function.name.startswith('glUniform') and function.args[0].name == arg.name == 'location':
-            print '    GLint program = -1;'
-            print '    glGetIntegerv(GL_CURRENT_PROGRAM, &program);'
+        if arg.type is glapi.GLlocation:
+            if 'program' not in [arg.name for arg in function.args]:
+                print '    GLint program = -1;'
+                print '    glGetIntegerv(GL_CURRENT_PROGRAM, &program);'
 
         Retracer.extract_arg(self, function, arg, arg_type, lvalue, rvalue)