From ae9c4c1e2ab603a484b5afa50b37e1d7ce95a7b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 2 Feb 2012 13:59:31 +0000 Subject: [PATCH] Warn when calling GL entry points without a current context. --- glretrace.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glretrace.py b/glretrace.py index e862e25..8dfc340 100644 --- a/glretrace.py +++ b/glretrace.py @@ -230,6 +230,11 @@ class GlRetracer(Retracer): if function.name == "glEnd": print ' glretrace::insideGlBeginEnd = false;' + if function.name.startswith('gl') and not function.name.startswith('glX'): + print r' if (!glretrace::context && !glretrace::benchmark && !retrace::profiling) {' + print r' retrace::warning(call) << "no current context\n";' + print r' }' + if function.name == 'memcpy': print ' if (!dest || !src || !n) return;' -- 2.45.2