From 0e2b251e39ef1322e4e9776dcf856d1ebf0112eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 7 May 2018 19:00:19 +0200 Subject: [PATCH] Platform: GLFW doesn't allow to create GL 3.1 core contexts. --- src/Magnum/Platform/GlfwApplication.cpp | 4 ++-- src/Magnum/Platform/GlfwApplication.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index b563209b7..f31236f9a 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -206,9 +206,9 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, major); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minor); #ifndef MAGNUM_TARGET_GLES - if(glConfiguration.version() >= GL::Version::GL310) { - glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, true); + if(glConfiguration.version() >= GL::Version::GL320) { glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, true); } #else glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); diff --git a/src/Magnum/Platform/GlfwApplication.h b/src/Magnum/Platform/GlfwApplication.h index c7bb0cf90..7b89de6af 100644 --- a/src/Magnum/Platform/GlfwApplication.h +++ b/src/Magnum/Platform/GlfwApplication.h @@ -544,7 +544,7 @@ class GlfwApplication::GLConfiguration { /** * @brief Set context version * - * If requesting version greater or equal to OpenGL 3.1, core profile + * If requesting version greater or equal to OpenGL 3.2, core profile * is used. The created context will then have any version which is * backwards-compatible with requested one. Default is * @ref GL::Version::None, i.e. any provided version is used.