From d5377811571da6909e39f9f1545054ee5fe43aa4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 7 Jun 2011 20:48:55 +0100 Subject: [PATCH] Do error checking in glCheckFramebufferStatus. --- glretrace.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glretrace.py b/glretrace.py index 0cb8972..9ce5430 100644 --- a/glretrace.py +++ b/glretrace.py @@ -250,6 +250,12 @@ class GlRetracer(Retracer): print r' if (__result != __orig_result) {' print r' std::cerr << call.no << ": warning vertex attrib location mismatch " << __orig_result << " -> " << __result << "\n";' print r' }' + if function.name in ('glCheckFramebufferStatus', 'glCheckFramebufferStatusEXT', 'glCheckNamedFramebufferStatusEXT'): + print r' GLint __orig_result = call.ret->toSInt();' + print r' if (__orig_result == GL_FRAMEBUFFER_COMPLETE &&' + print r' __result != GL_FRAMEBUFFER_COMPLETE) {' + print r' std::cerr << call.no << ": incomplete framebuffer (" << __result << ")\n";' + print r' }' print ' }' def extract_arg(self, function, arg, arg_type, lvalue, rvalue): -- 2.7.4