From 9bc0943d49b5165d703634194999ce0c31b14ce6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 9 May 2011 09:10:18 +0100 Subject: [PATCH] Allow to do GLlocation mapping in more places. --- glretrace.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/glretrace.py b/glretrace.py index e6cf631..101ca08 100644 --- a/glretrace.py +++ b/glretrace.py @@ -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) -- 2.45.2