Browse Source

Platform: properly redraw GlfwApplication restored from minimize.

Lots of things unfinished here.
pull/191/head
Vladimír Vondruš 8 years ago
parent
commit
b48b0c1296
  1. 4
      src/Magnum/Platform/GlfwApplication.cpp

4
src/Magnum/Platform/GlfwApplication.cpp

@ -344,6 +344,10 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf
void GlfwApplication::setupCallbacks() {
glfwSetWindowUserPointer(_window, this);
glfwSetWindowRefreshCallback(_window, [](GLFWwindow* const window){
/* Properly redraw after the window is restored from minimized state */
static_cast<GlfwApplication*>(glfwGetWindowUserPointer(window))->drawEvent();
});
glfwSetFramebufferSizeCallback(_window, [](GLFWwindow* const window, const int w, const int h) {
static_cast<GlfwApplication*>(glfwGetWindowUserPointer(window))->viewportEvent({w, h});
});

Loading…
Cancel
Save