From: José Fonseca Date: Thu, 2 Feb 2012 13:59:31 +0000 (+0000) Subject: Warn when calling GL entry points without a current context. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=ae9c4c1e2ab603a484b5afa50b37e1d7ce95a7b4;p=apitrace Warn when calling GL entry points without a current context. --- 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;'