]> git.cworth.org Git - apitrace/blobdiff - glproc.py
Don't overflow the max index when the app isn't rendering anything.
[apitrace] / glproc.py
index e1e7d16f3ed164ec3369859f413f16f2c40e8feb..29031b7002798c70da499d5b51ff2e0bbeb2b482 100644 (file)
--- a/glproc.py
+++ b/glproc.py
@@ -421,9 +421,9 @@ class GlDispatcher(Dispatcher):
         print '#    define __getPrivateProcAddress(name) __wglGetProcAddress(name)'
         print '     static inline PROC __stdcall __wglGetProcAddress(const char * lpszProc);'
         print '#  else'
-        print '     static void *libgl_handle = RTLD_NEXT;'
-        print '#    define __getPublicProcAddress(name) dlsym(libgl_handle, name)'
+        print '#    define __getPublicProcAddress(name) __dlsym(name)'
         print '#    define __getPrivateProcAddress(name) __glXGetProcAddressARB((const GLubyte *)(name))'
+        print '     static void * __dlsym(const char *symbol);'
         print '     static inline __GLXextFuncPtr __glXGetProcAddressARB(const GLubyte * procName);'
         print '#  endif'
         print '#  define __abort() Trace::Abort()'