X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=dispatch%2Fglproc.py;h=ea1667af3ef9148ceca5c374bcf3a16ca32115a1;hb=9d9eb81d94075181c360d4712b9fd3baa58d5782;hp=abf4f00e20063a824373083f9de4c363694694b7;hpb=0e5d1ff1e54079cdb89b409a5621fc33414244d6;p=apitrace diff --git a/dispatch/glproc.py b/dispatch/glproc.py index abf4f00..ea1667a 100644 --- a/dispatch/glproc.py +++ b/dispatch/glproc.py @@ -503,9 +503,33 @@ void * _getPublicProcAddress(const char *procName); void * _getPrivateProcAddress(const char *procName); ''' - def isFunctionPublic(self, api, function): + def isFunctionPublic(self, module, function): return function.name in public_symbols or function.name.startswith('CGL') + def failFunction(self, function): + # We fake this when they are not available + if function.name in ('glGetObjectLabel', 'glGetObjectPtrLabel'): + print r' if (length != 0) *length = 0;' + print r' if (label != 0 && bufSize > 0) *label = 0;' + return + if function.name in ('glGetDebugMessageLog', 'glGetDebugMessageLogARB'): + print r' if (sources != 0) *sources = 0;' + print r' if (types != 0) *types = 0;' + print r' if (ids != 0) *ids = 0;' + print r' if (severities != 0) *severities = 0;' + print r' if (lengths != 0) *lengths = 0;' + print r' if (messageLog != 0 && bufsize > 0) *messageLog = 0;' + return + if function.name in ('glGetDebugMessageLogAMD'): + print r' if (categories != 0) *categories = 0;' + print r' if (ids != 0) *ids = 0;' + print r' if (severities != 0) *severities = 0;' + print r' if (lengths != 0) *lengths = 0;' + print r' if (message != 0 && bufsize > 0) *message = 0;' + return + + Dispatcher.failFunction(self, function) + if __name__ == '__main__': print @@ -519,25 +543,25 @@ if __name__ == '__main__': print dispatcher.header() print - dispatcher.dispatchApi(eglapi) + dispatcher.dispatchModule(eglapi) print print '#if defined(_WIN32)' print - dispatcher.dispatchApi(wglapi) + dispatcher.dispatchModule(wglapi) print print '#elif defined(__APPLE__)' print - dispatcher.dispatchApi(cglapi) + dispatcher.dispatchModule(cglapi) print print '#elif defined(HAVE_X11)' print - dispatcher.dispatchApi(glxapi) + dispatcher.dispatchModule(glxapi) print print '#endif' print - dispatcher.dispatchApi(glapi) + dispatcher.dispatchModule(glapi) print - dispatcher.dispatchApi(glesapi) + dispatcher.dispatchModule(glesapi) print print '#endif /* !_GLPROC_HPP_ */'