This is essentially the same as glXGetProcAddressARB
return real_glXGetProcAddressARB (func);
}
+
+void
+(*glXGetProcAddress (const GLubyte *func))(void)
+{
+ static typeof(&glXGetProcAddress) real_glXGetProcAddress = NULL;
+
+ if (strcmp((char *) func, "glXSwapBuffers") == 0)
+ return (void*) glXSwapBuffers;
+
+ if (real_glXGetProcAddress == NULL)
+ real_glXGetProcAddress = dlsym (RTLD_NEXT, "glXGetProcAddress");
+
+ return real_glXGetProcAddress (func);
+}