From 71f5a35e3bc1801847413cff1f14fc3b5cd991ca Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 28 Jul 2014 12:19:50 +0100 Subject: gltrace/glretrace: Fake all debug functions. And not just the glGet*. Fixes issue #281. --- dispatch/glproc.py | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'dispatch') diff --git a/dispatch/glproc.py b/dispatch/glproc.py index dd085c30..1842ee57 100644 --- a/dispatch/glproc.py +++ b/dispatch/glproc.py @@ -503,7 +503,32 @@ class GlDispatcher(Dispatcher): return '_getPrivateProcAddress' def failFunction(self, function): - # We fake this when they are not available + # We fake these when they are not available + if function.name in ( + # GL_KHR_debug + 'glDebugMessageControl', + 'glDebugMessageInsert', + 'glDebugMessageCallback', + 'glPushDebugGroup', + 'glPopDebugGroup', + 'glObjectLabel', + 'glObjectPtrLabel', + # GL_ARB_debug_output + 'glDebugMessageControlARB', + 'glDebugMessageInsertARB', + 'glDebugMessageCallbackARB', + # GL_AMD_debug_output + 'glDebugMessageEnableAMD', + 'glDebugMessageInsertAMD', + 'glDebugMessageCallbackAMD', + # GL_EXT_debug_label + 'glLabelObjectEXT', + # GL_EXT_debug_marker + 'glInsertEventMarkerEXT', + 'glPushGroupMarkerEXT', + 'glPopGroupMarkerEXT', + ): + return if function.name in ('glGetObjectLabel', 'glGetObjectPtrLabel', 'glGetObjectLabelEXT'): print r' if (length != 0) *length = 0;' print r' if (label != 0 && bufSize > 0) *label = 0;' -- cgit v1.2.3