From 6a345ea9827aa83e99abd1c6e046d513ce93eb78 Mon Sep 17 00:00:00 2001 From: Tracy Ma <1991md@gmail.com> Date: Mon, 21 Sep 2020 16:36:15 +0800 Subject: [PATCH] Fix: unable to create gl context on desktop with ANGLE + GLFW3 --- src/Magnum/Platform/GlfwApplication.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index 338483471..a9e13c4fe 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -451,6 +451,9 @@ 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 */ @@ -475,6 +478,9 @@ 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 }