Improvements to IndexedGeometry.

This commit is contained in:
Robert Osfield
2002-09-27 17:47:47 +00:00
parent 2a28a4297f
commit f8edf16c40
2 changed files with 262 additions and 187 deletions

View File

@@ -46,15 +46,7 @@ inline void* getGLExtensionFuncPtr(const char *funcName)
} else
return NULL;
#else // all other unixes
// Note: although we use shl_load() etc. for Plugins on HP-UX, it's
// not neccessary here since we only used them because library
// intialization was not taking place with dlopen() which renders
// Plugins useless on HP-UX.
static void *lib = dlopen("libGL.so", RTLD_LAZY);
if (lib)
return dlsym(lib, funcName);
else
return NULL;
return dlsym(0, funcName);
#endif
}
@@ -76,31 +68,6 @@ inline void* getGLExtensionFuncPtr(const char *funcName,const char *fallbackFunc
*/
SG_EXPORT extern bool isGLUExtensionSupported(const char *extension);
inline void* getGLUExtensionFuncPtr(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() ) )
{
NSSymbol symbol = NSLookupAndBindSymbol( temp.c_str() );
return NSAddressOfSymbol( symbol );
} else
return NULL;
#else // all other unixes
// Note: although we use shl_load() etc. for Plugins on HP-UX, it's
// not neccessary here since we only used them because library
// intialization was not taking place with dlopen() which renders
// Plugins useless on HP-UX.
static void *lib = dlopen("libGLU.so", RTLD_LAZY);
if (lib)
return dlsym(lib, funcName);
else
return NULL;
#endif
}
}