Browse Source

Platform: move a window creation asset to a better place in GlfwApp.

So this gets checked even when the user is calling mainLoopIteration()
directly.
pull/434/head
Vladimír Vondruš 6 years ago
parent
commit
ce0efd1aeb
  1. 4
      src/Magnum/Platform/GlfwApplication.cpp

4
src/Magnum/Platform/GlfwApplication.cpp

@ -720,14 +720,14 @@ void GlfwApplication::setSwapInterval(const Int interval) {
void GlfwApplication::redraw() { _flags |= Flag::Redraw; }
int GlfwApplication::exec() {
CORRADE_ASSERT(_window, "Platform::GlfwApplication::exec(): no window opened", {});
while(mainLoopIteration()) {}
return _exitCode;
}
bool GlfwApplication::mainLoopIteration() {
CORRADE_ASSERT(_window, "Platform::GlfwApplication::mainLoopIteration(): no window opened", {});
if(_flags & Flag::Redraw) {
_flags &= ~Flag::Redraw;
drawEvent();

Loading…
Cancel
Save