mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-22 22:05: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)
|
void* NSGLGetProcAddress (const GLubyte *name)
|
||||||
{
|
{
|
||||||
static void* image = NULL;
|
static void* image = NULL;
|
||||||
|
void* addr;
|
||||||
if (NULL == image)
|
if (NULL == image)
|
||||||
{
|
{
|
||||||
image = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY);
|
image = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY);
|
||||||
}
|
}
|
||||||
if( !image ) return NULL;
|
if( !image ) return NULL;
|
||||||
void* addr = dlsym(image, (const char*)name);
|
addr = dlsym(image, (const char*)name);
|
||||||
if( addr ) return addr;
|
if( addr ) return addr;
|
||||||
#ifdef GLEW_APPLE_GLX
|
#ifdef GLEW_APPLE_GLX
|
||||||
return dlGetProcAddress( name ); // try next for glx symbols
|
return dlGetProcAddress( name ); // try next for glx symbols
|
||||||
|
Loading…
Reference in New Issue
Block a user