Browse Source

Make the "Fix: can not create gl context with GLFW3 + ANGLE" apply to Windows & EGL only

pull/470/head
tracyma 6 years ago
parent
commit
b7357b527a
  1. 4
      src/Magnum/Platform/GlfwApplication.cpp

4
src/Magnum/Platform/GlfwApplication.cpp

@ -451,8 +451,10 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf
} }
#else #else
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); 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); glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
#endif #endif
#endif
/* Request usable version otherwise */ /* Request usable version otherwise */
} else { } else {
@ -476,8 +478,10 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf
#endif #endif
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); 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); glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
#endif #endif
#endif
} }
/* Create window. Hide it by default so we don't have distracting window /* Create window. Hide it by default so we don't have distracting window

Loading…
Cancel
Save