From db0726a32851958e0df55ec351a5fdcf85fbf5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 22 Nov 2018 16:52:36 +0100 Subject: [PATCH] Platform: ensure the CGL function loading is not used for GLES. This bit me hard today. --- src/Magnum/Platform/Implementation/OpenGLFunctionLoader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Platform/Implementation/OpenGLFunctionLoader.cpp b/src/Magnum/Platform/Implementation/OpenGLFunctionLoader.cpp index dd0136acb..8ca0198ba 100644 --- a/src/Magnum/Platform/Implementation/OpenGLFunctionLoader.cpp +++ b/src/Magnum/Platform/Implementation/OpenGLFunctionLoader.cpp @@ -63,8 +63,10 @@ auto OpenGLFunctionLoader::load(const char* const name) -> FunctionPointer { return eglGetProcAddress(name); } -/* CGL-specific implementation */ -#elif defined(CORRADE_TARGET_APPLE) +/* CGL-specific implementation. Apple doesn't have any possibility of a + "desktop GLES" implementation (and never will have), so explicitly check + that we are *not* on GLES. */ +#elif defined(CORRADE_TARGET_APPLE) && !defined(MAGNUM_TARGET_GLES) OpenGLFunctionLoader::OpenGLFunctionLoader() { CORRADE_INTERNAL_ASSERT_OUTPUT(library = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY)); }