+
+
+typedef __GLXextFuncPtr (* fips_glXGetProcAddressARB_t)(const GLubyte *func);
+__GLXextFuncPtr
+glXGetProcAddressARB (const GLubyte *func)
+{
+ __GLXextFuncPtr ptr;
+ static fips_glXGetProcAddressARB_t real_glXGetProcAddressARB = NULL;
+ const char *name = "glXGetProcAddressARB";
+
+ if (! real_glXGetProcAddressARB) {
+ real_glXGetProcAddressARB = (fips_glXGetProcAddressARB_t) lookup (name);
+ if (! real_glXGetProcAddressARB) {
+ fprintf (stderr, "Error: Failed to find function %s.\n",
+ name);
+ return NULL;
+ }
+ }
+
+ /* If our library has this symbol, that's what we want to give. */
+ ptr = dlwrap_real_dlsym (NULL, (const char *) func);
+ if (ptr)
+ return ptr;
+
+ /* Otherwise, just defer to the real glXGetProcAddressARB. */
+ return real_glXGetProcAddressARB (func);
+}