mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-22 14:45:06 +00:00
Resolve ID: 3480806 - Fix GCC warning on Mac OS X
This commit is contained in:
parent
784f34ad51
commit
da591ff48c
@ -69,12 +69,13 @@ void* dlGetProcAddress (const GLubyte* name)
|
||||
void* NSGLGetProcAddress (const GLubyte *name)
|
||||
{
|
||||
static void* image = NULL;
|
||||
void* addr;
|
||||
if (NULL == image)
|
||||
{
|
||||
image = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY);
|
||||
}
|
||||
if( !image ) return NULL;
|
||||
void* addr = dlsym(image, (const char*)name);
|
||||
addr = dlsym(image, (const char*)name);
|
||||
if( addr ) return addr;
|
||||
#ifdef GLEW_APPLE_GLX
|
||||
return dlGetProcAddress( name ); // try next for glx symbols
|
||||
|
Loading…
Reference in New Issue
Block a user