emulator: opengl: Open libGL.dylib as a framework on Mac

This patch modifies GLDispatch.cpp in the translator libraries
to open the Darwin GL library as a framework. Using a hard-coded
system path prevents the requirement to modify LD_LIBRARY_PATH
or DYLD_LIBRARY_PATH to point to the directory that contains the
library.

In this specific case, this is equivalent to

/System/Frameworks/OpenGL.framework/Libraries/libGL.dylib

But is the "kosher" way to open it the library.

Change-Id: Iccd6568d36fc97200617c268f05d7b4ea85f918e
This commit is contained in:
David 'Digit' Turner
2011-08-24 16:35:13 +02:00
parent 3ee119cda4
commit 3f88bea9a8

View File

@@ -37,7 +37,7 @@ static GL_FUNC_PTR getGLFuncAddress(const char *funcName) {
static osUtils::dynLibrary* libGL = osUtils::dynLibrary::open("opengl32");
ret = (GL_FUNC_PTR)wglGetProcAddress(funcName);
#elif defined(__APPLE__)
static osUtils::dynLibrary* libGL = osUtils::dynLibrary::open("libGL.dylib");
static osUtils::dynLibrary* libGL = osUtils::dynLibrary::open("/System/Library/Frameworks/OpenGL.framework/OpenGL");
#endif
if(!ret && libGL){
ret = libGL->findSymbol(funcName);