Browse Source

Platform: GLFW doesn't allow to create GL 3.1 core contexts.

pull/194/merge
Vladimír Vondruš 8 years ago
parent
commit
0e2b251e39
  1. 4
      src/Magnum/Platform/GlfwApplication.cpp
  2. 2
      src/Magnum/Platform/GlfwApplication.h

4
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);

2
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.

Loading…
Cancel
Save