From 126f64f0aef666f30b5867edcef6990d56c525c8 Mon Sep 17 00:00:00 2001 From: Squareys Date: Mon, 10 Oct 2016 01:01:48 +0200 Subject: [PATCH] GlfwApplication: Properly handle Version::None Signed-off-by: Squareys --- src/Magnum/Platform/GlfwApplication.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index 4dc2df013..4be5c8c54 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -125,8 +125,9 @@ bool GlfwApplication::tryCreateContext(const Configuration& configuration) { #else glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); #endif + } else { + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); } - glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); /* Set context flags */ _window = glfwCreateWindow(configuration.size().x(), configuration.size().y(), configuration.title().c_str(), monitor, nullptr); @@ -146,7 +147,11 @@ bool GlfwApplication::tryCreateContext(const Configuration& configuration) { glfwMakeContextCurrent(_window); /* Return true if the initialization succeeds */ - return true; //_context->tryCreate(); + if(configuration.version() != Version::None) { + return _context->tryCreate(); + } else { + return true; + } } GlfwApplication::~GlfwApplication() {