diff --git a/auto/src/glew_head.c b/auto/src/glew_head.c index 4aa2f33..16cd153 100644 --- a/auto/src/glew_head.c +++ b/auto/src/glew_head.c @@ -41,15 +41,21 @@ void* NSGLGetProcAddress (const GLubyte *name) { + static struct mach_header* image = NULL; NSSymbol symbol; char* symbolName; + if (NULL == image) + { + image = NSAddImage("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", NSADDIMAGE_OPTION_RETURN_ON_ERROR); + } /* prepend a '_' for the Unix C symbol mangling convention */ symbolName = malloc(strlen((const char*)name) + 2); strcpy(symbolName+1, (const char*)name); symbolName[0] = '_'; symbol = NULL; - if (NSIsSymbolNameDefined(symbolName)) - symbol = NSLookupAndBindSymbol(symbolName); + /* if (NSIsSymbolNameDefined(symbolName)) + symbol = NSLookupAndBindSymbol(symbolName); */ + symbol = image ? NSLookupSymbolInImage(image, symbolName, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR) : NULL; free(symbolName); return symbol ? NSAddressOfSymbol(symbol) : NULL; } diff --git a/config/version b/config/version index d5da775..da4150b 100644 --- a/config/version +++ b/config/version @@ -1,6 +1,6 @@ GLEW_MAJOR = 1 GLEW_MINOR = 3 -GLEW_MICRO = 4 +GLEW_MICRO = 5 GLEW_VERSION = $(GLEW_MAJOR).$(GLEW_MINOR).$(GLEW_MICRO) GLEW_NAME = GLEW SO_MAJOR = $(GLEW_MAJOR).$(GLEW_MINOR)