Some applications may be using this to get at the functions we want to
wrap, so we have to wrap it as well.
#include <GL/glx.h>
#include <sys/time.h>
#include <GL/glx.h>
#include <sys/time.h>
/* How many frames between reports. */
#define REPORT_FREQ 60
/* How many frames between reports. */
#define REPORT_FREQ 60
real_glXSwapBuffers (dpy, drawable);
}
real_glXSwapBuffers (dpy, drawable);
}
+
+void
+(*glXGetProcAddressARB (const GLubyte *func))(void)
+{
+ static typeof(&glXGetProcAddressARB) real_glXGetProcAddressARB = NULL;
+
+ if (strcmp((char *) func, "glXSwapBuffers") == 0)
+ return (void*) glXSwapBuffers;
+
+ if (real_glXGetProcAddressARB == NULL)
+ real_glXGetProcAddressARB = dlsym (RTLD_NEXT, "glXGetProcAddressARB");
+
+ return real_glXGetProcAddressARB (func);
+}