Browse Source

GlfwApplication: Properly handle Version::None

Signed-off-by: Squareys <Squareys@googlemail.com>
pull/202/head
Squareys 10 years ago
parent
commit
126f64f0ae
  1. 9
      src/Magnum/Platform/GlfwApplication.cpp

9
src/Magnum/Platform/GlfwApplication.cpp

@ -125,8 +125,9 @@ bool GlfwApplication::tryCreateContext(const Configuration& configuration) {
#else #else
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
#endif #endif
} } else {
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
}
/* Set context flags */ /* Set context flags */
_window = glfwCreateWindow(configuration.size().x(), configuration.size().y(), configuration.title().c_str(), monitor, nullptr); _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); glfwMakeContextCurrent(_window);
/* Return true if the initialization succeeds */ /* Return true if the initialization succeeds */
return true; //_context->tryCreate(); if(configuration.version() != Version::None) {
return _context->tryCreate();
} else {
return true;
}
} }
GlfwApplication::~GlfwApplication() { GlfwApplication::~GlfwApplication() {

Loading…
Cancel
Save