From: Carl Worth Date: Fri, 20 Sep 2013 23:40:32 +0000 (-0700) Subject: Add support for glXGetProcAddress as well X-Git-Url: https://git.cworth.org/git?p=glfps;a=commitdiff_plain;h=b308db9a0f6de6b3ee6cf15c9a28bb7bcab590dc Add support for glXGetProcAddress as well This is essentially the same as glXGetProcAddressARB --- diff --git a/glfps.c b/glfps.c index e6739e4..a23dd20 100644 --- 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); +}