]> git.notmuchmail.org Git - glfps/commitdiff
Add support for glXGetProcAddress as well
authorCarl Worth <cworth@cworth.org>
Fri, 20 Sep 2013 23:40:32 +0000 (16:40 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 23 Sep 2013 14:11:38 +0000 (07:11 -0700)
This is essentially the same as glXGetProcAddressARB

glfps.c

diff --git a/glfps.c b/glfps.c
index e6739e4fad279588459ba6723dffb8119a58ef02..a23dd2098d22289d61c2f9351194751d6c7fa556 100644 (file)
--- a/glfps.c
+++ b/glfps.c
@@ -61,3 +61,17 @@ void
 
        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);
+}