Changed the linux implement of getGLExtensionFuncPtr to querry for glXGetProcAddressARB

and then use this if its available, otherwise fallback to the original dlsym usage.
This commit is contained in:
Robert Osfield
2005-11-23 15:25:56 +00:00
parent 74830f9ce1
commit 4ca3a4fd45

View File

@@ -245,6 +245,20 @@ void* osg::getGLExtensionFuncPtr(const char *funcName)
return dlsym( RTLD_DEFAULT, funcName );
#elif defined (__linux__)
typedef void (*__GLXextFuncPtr)(void);
typedef __GLXextFuncPtr (*GetProcAddressARBProc)(const char*);
static GetProcAddressARBProc s_glXGetProcAddressARB = (GetProcAddressARBProc)dlsym(0, "glXGetProcAddressARB");
if (s_glXGetProcAddressARB)
{
return (void*) (s_glXGetProcAddressARB)(funcName);
}
else
{
return dlsym(0, funcName);
}
#else // all other unixes
return dlsym(0, funcName);