def header(self):
print '#ifdef RETRACE'
- print '# ifdef WIN32'
+ print '# ifdef _WIN32'
print '# define __getPrivateProcAddress(name) wglGetProcAddress(name)'
print '# else'
print '# define __getPrivateProcAddress(name) glXGetProcAddressARB((const GLubyte *)(name))'
print '# endif'
print '# define __abort() OS::Abort()'
print '#else /* !RETRACE */'
- print '# ifdef WIN32'
+ print '# ifdef _WIN32'
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()'
print
dispatcher = GlDispatcher()
dispatcher.header()
- print '#ifdef WIN32'
+ print '#ifdef _WIN32'
print
dispatcher.dispatch_api(wglapi)
- print '#else /* !WIN32 */'
+ print '#else /* !_WIN32 */'
print
dispatcher.dispatch_api(glxapi)
- print '#endif /* !WIN32 */'
+ print '#endif /* !_WIN32 */'
print
dispatcher.dispatch_api(glapi)
print