diff --git a/auto/src/glew_head.c b/auto/src/glew_head.c index 61c8067..5be0365 100644 --- a/auto/src/glew_head.c +++ b/auto/src/glew_head.c @@ -35,7 +35,8 @@ # define GLXEW_CONTEXT_ARG_DEF_LIST void #endif /* GLEW_MX */ -#if defined(__sgi) || defined (__sun) || defined(__HAIKU__) || defined(GLEW_APPLE_GLX) +#if defined(GLEW_REGAL) +#elif defined(__sgi) || defined (__sun) || defined(__HAIKU__) || defined(GLEW_APPLE_GLX) #include #include #include @@ -73,11 +74,7 @@ void* NSGLGetProcAddress (const GLubyte *name) void* addr; if (NULL == image) { -#ifdef GLEW_REGAL - image = dlopen("libRegal.dylib", RTLD_LAZY); -#else image = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY); -#endif } if( !image ) return NULL; addr = dlsym(image, (const char*)name); @@ -99,11 +96,7 @@ void* NSGLGetProcAddress (const GLubyte *name) char* symbolName; if (NULL == image) { -#ifdef GLEW_REGAL - image = NSAddImage("libRegal.dylib", NSADDIMAGE_OPTION_RETURN_ON_ERROR); -#else image = NSAddImage("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", NSADDIMAGE_OPTION_RETURN_ON_ERROR); -#endif } /* prepend a '_' for the Unix C symbol mangling convention */ symbolName = malloc(strlen((const char*)name) + 2); @@ -127,7 +120,9 @@ void* NSGLGetProcAddress (const GLubyte *name) /* * Define glewGetProcAddress. */ -#if defined(_WIN32) +#if defined(GLEW_REGAL) +# define glewGetProcAddress(name) glGetProcAddressREGAL(name) +#elif defined(_WIN32) # define glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name) #elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) # define glewGetProcAddress(name) NSGLGetProcAddress(name)