From ea82c3f539495642a9e8f95cb47fc67b6eed18ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 29 Mar 2012 08:19:19 +0100 Subject: [PATCH] Update drawable on variations of glViewport (issue #71) Thanks to Gregory (gregory38) for spotting this. --- glretrace.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/glretrace.py b/glretrace.py index deeb86d..bb88288 100644 --- a/glretrace.py +++ b/glretrace.py @@ -224,6 +224,21 @@ class GlRetracer(Retracer): # Infer the drawable size from GL calls if function.name == "glViewport": print ' glretrace::updateDrawable(x + width, y + height);' + if function.name == "glViewportArray": + # We are concerned about drawables so only care for the first viewport + print ' if (first == 0 && count > 0) {' + print ' GLfloat x = v[0], y = v[1], w = v[2], h = v[3];' + print ' glretrace::updateDrawable(x + w, y + h);' + print ' }' + if function.name == "glViewportIndexedf": + print ' if (index == 0) {' + print ' glretrace::updateDrawable(x + w, y + h);' + print ' }' + if function.name == "glViewportIndexedfv": + print ' if (index == 0) {' + print ' GLfloat x = v[0], y = v[1], w = v[2], h = v[3];' + print ' glretrace::updateDrawable(x + w, y + h);' + print ' }' if function.name in ('glBlitFramebuffer', 'glBlitFramebufferEXT'): # Some applications do all their rendering in a framebuffer, and # then just blit to the drawable without ever calling glViewport. -- 2.43.0