From b7357b527aa0b139047b417f61a670f4f9eb2bde Mon Sep 17 00:00:00 2001 From: tracyma <1991md@gmail.com> Date: Mon, 21 Sep 2020 20:26:49 +0800 Subject: [PATCH] Make the "Fix: can not create gl context with GLFW3 + ANGLE" apply to Windows & EGL only --- src/Magnum/Platform/GlfwApplication.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index 433e26e43..a9e13c4fe 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -451,8 +451,10 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf } #else glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); + #if defined(CORRADE_TARGET_WINDOWS) && !defined(MAGNUM_TARGET_DESKTOP_GLES) glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); #endif + #endif /* Request usable version otherwise */ } else { @@ -476,8 +478,10 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf #endif glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); + #if defined(CORRADE_TARGET_WINDOWS) && !defined(MAGNUM_TARGET_DESKTOP_GLES) glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); #endif + #endif } /* Create window. Hide it by default so we don't have distracting window