Index: utOpenGL.cpp =================================================================== --- utOpenGL.cpp (revision 763) +++ utOpenGL.cpp (working copy) @@ -15,6 +15,9 @@ #include #include +#if defined PLATFORM_MAC +#include +#endif namespace glExt { @@ -239,18 +242,10 @@ #elif defined( PLATFORM_WIN_CE ) return (void *)eglGetProcAddress( funcName ); #elif defined( PLATFORM_MAC ) - CFStringRef functionName = CFStringCreateWithCString( kCFAllocatorDefault, funcName, kCFStringEncodingASCII ); - CFURLRef bundleURL = CFURLCreateWithFileSystemPath( - kCFAllocatorDefault, CFSTR( "/System/Library/Frameworks/OpenGL.framework" ), kCFURLPOSIXPathStyle, true ); - CFBundleRef bundle = CFBundleCreate( kCFAllocatorDefault, bundleURL ); - - void *function = CFBundleGetFunctionPointerForName( bundle, functionName ); - - CFRelease( bundle ); - CFRelease( bundleURL ); - CFRelease( functionName ); - - return function; + static void * handle = dlopen( + "/System/Library/Frameworks/OpenGL.framework/OpenGL", + RTLD_LAZY | RTLD_LOCAL); + return dlsym(handle, funcName); #else return (void *)glXGetProcAddressARB( (const GLubyte *)funcName ); #endif