mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Try more possible names for OpenGLES library. Fixes SFML/SFML#1687
This commit is contained in:
parent
089f0fd8b4
commit
47a4e88704
@ -164,8 +164,19 @@ GlFunctionPointer EaglContext::getFunction(const char* name)
|
||||
{
|
||||
static void* module = 0;
|
||||
|
||||
if (!module)
|
||||
module = dlopen("libGLESv1_CM.dylib", RTLD_LAZY | RTLD_LOCAL);
|
||||
const int libCount = 3;
|
||||
const char* libs[libCount] =
|
||||
{
|
||||
"libGLESv1_CM.dylib",
|
||||
"/System/Library/Frameworks/OpenGLES.framework/OpenGLES",
|
||||
"OpenGLES.framework/OpenGLES"
|
||||
};
|
||||
|
||||
for (int i = 0; i < libCount; ++i)
|
||||
{
|
||||
if (!module)
|
||||
module = dlopen(libs[i], RTLD_LAZY | RTLD_LOCAL);
|
||||
}
|
||||
|
||||
if (module)
|
||||
return reinterpret_cast<GlFunctionPointer>(dlsym(module, name));
|
||||
|
Loading…
Reference in New Issue
Block a user