From b308db9a0f6de6b3ee6cf15c9a28bb7bcab590dc Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 20 Sep 2013 16:40:32 -0700 Subject: [PATCH] Add support for glXGetProcAddress as well This is essentially the same as glXGetProcAddressARB --- glfps.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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); +} -- 2.43.0