X-Git-Url: https://git.cworth.org/git?p=glfps;a=blobdiff_plain;f=glfps.c;fp=glfps.c;h=a23dd2098d22289d61c2f9351194751d6c7fa556;hp=e6739e4fad279588459ba6723dffb8119a58ef02;hb=b308db9a0f6de6b3ee6cf15c9a28bb7bcab590dc;hpb=b61062a780ddc9eea7217cb4f110cb65e5148b23 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); +}