#include <GL/glx.h>
#include <sys/time.h>
+#include <string.h>
/* How many frames between reports. */
#define REPORT_FREQ 60
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);
+}