From: José Fonseca Date: Mon, 9 May 2011 08:10:18 +0000 (+0100) Subject: Allow to do GLlocation mapping in more places. X-Git-Tag: 2.0_alpha^2~938^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9bc0943d49b5165d703634194999ce0c31b14ce6;p=tools%2Fapitrace.git Allow to do GLlocation mapping in more places. --- 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)