From Sean, fix for Sun windows extension checking.
This commit is contained in:
parent
1f8e656737
commit
27c4dc0920
@ -45,8 +45,11 @@ extern SG_EXPORT bool isGLExtensionSupported(const char *extension);
|
||||
inline void* getGLExtensionFuncPtr(const char *funcName)
|
||||
{
|
||||
#if defined(WIN32)
|
||||
|
||||
return (void*)wglGetProcAddress(funcName);
|
||||
|
||||
#elif defined(__DARWIN_OSX__)
|
||||
|
||||
std::string temp( "_" );
|
||||
temp += funcName; // Mac OS X prepends an underscore on function names
|
||||
if ( NSIsSymbolNameDefined( temp.c_str() ) )
|
||||
@ -55,8 +58,16 @@ inline void* getGLExtensionFuncPtr(const char *funcName)
|
||||
return NSAddressOfSymbol( symbol );
|
||||
} else
|
||||
return NULL;
|
||||
|
||||
#elif defined (__sun)
|
||||
|
||||
static void *handle = dlopen((const char *)0L, RTLD_LAZY);
|
||||
return dlsym(handle, funcName);
|
||||
|
||||
#else // all other unixes
|
||||
|
||||
return dlsym(0, funcName);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user