mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-29 09:11:56 +00:00
version bump + added osx fix
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@432 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
bd9e5e71d4
commit
e5a1cd226a
@ -41,15 +41,21 @@
|
|||||||
|
|
||||||
void* NSGLGetProcAddress (const GLubyte *name)
|
void* NSGLGetProcAddress (const GLubyte *name)
|
||||||
{
|
{
|
||||||
|
static struct mach_header* image = NULL;
|
||||||
NSSymbol symbol;
|
NSSymbol symbol;
|
||||||
char* symbolName;
|
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 */
|
/* prepend a '_' for the Unix C symbol mangling convention */
|
||||||
symbolName = malloc(strlen((const char*)name) + 2);
|
symbolName = malloc(strlen((const char*)name) + 2);
|
||||||
strcpy(symbolName+1, (const char*)name);
|
strcpy(symbolName+1, (const char*)name);
|
||||||
symbolName[0] = '_';
|
symbolName[0] = '_';
|
||||||
symbol = NULL;
|
symbol = NULL;
|
||||||
if (NSIsSymbolNameDefined(symbolName))
|
/* if (NSIsSymbolNameDefined(symbolName))
|
||||||
symbol = NSLookupAndBindSymbol(symbolName);
|
symbol = NSLookupAndBindSymbol(symbolName); */
|
||||||
|
symbol = image ? NSLookupSymbolInImage(image, symbolName, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR) : NULL;
|
||||||
free(symbolName);
|
free(symbolName);
|
||||||
return symbol ? NSAddressOfSymbol(symbol) : NULL;
|
return symbol ? NSAddressOfSymbol(symbol) : NULL;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
GLEW_MAJOR = 1
|
GLEW_MAJOR = 1
|
||||||
GLEW_MINOR = 3
|
GLEW_MINOR = 3
|
||||||
GLEW_MICRO = 4
|
GLEW_MICRO = 5
|
||||||
GLEW_VERSION = $(GLEW_MAJOR).$(GLEW_MINOR).$(GLEW_MICRO)
|
GLEW_VERSION = $(GLEW_MAJOR).$(GLEW_MINOR).$(GLEW_MICRO)
|
||||||
GLEW_NAME = GLEW
|
GLEW_NAME = GLEW
|
||||||
SO_MAJOR = $(GLEW_MAJOR).$(GLEW_MINOR)
|
SO_MAJOR = $(GLEW_MAJOR).$(GLEW_MINOR)
|
||||||
|
Loading…
Reference in New Issue
Block a user