Handle glXCreateContextAttribsARB not being an exported module symbol

* This is true for e.g. mesa drivers
This commit is contained in:
baldurk
2015-08-23 22:32:43 +02:00
parent 0738850719
commit d1c24b0138
+4
View File
@@ -791,6 +791,10 @@ __GLXextFuncPtr glXGetProcAddress(const GLubyte *f)
return (__GLXextFuncPtr)dlsym(libGLdlsymHandle, (const char *)f);
}
// this might not be dlsym exported, so if it's GPA'd, record the real pointer for oureslves
if(!strcmp(func, "glXCreateContextAttribsARB") && OpenGLHook::glhooks.glXCreateContextAttribsARB_real == NULL)
OpenGLHook::glhooks.glXCreateContextAttribsARB_real = (PFNGLXCREATECONTEXTATTRIBSARBPROC)realFunc;
// handle a few functions that we only export as real functions, just
// in case
if(!strcmp(func, "glXCreateContext")) return (__GLXextFuncPtr)&glXCreateContext;