Move the Gui rendering into a postdraw call so that it works for non-standard rendering techniques (like fisheye)

Closing #119
This commit is contained in:
Alexander Bock
2016-07-16 16:46:31 +02:00
parent dc32dfe075
commit 5c95c34752
+10 -11
View File
@@ -818,21 +818,20 @@ void OpenSpaceEngine::render(const glm::mat4& projectionMatrix, const glm::mat4&
bool showGui = _windowWrapper->hasGuiWindow() ? _windowWrapper->isGuiWindow() : true;
_renderEngine->render(projectionMatrix, viewMatrix, showGui);
if (_isMaster && _windowWrapper->isRegularRendering()) {
if (showGui) {
if (_console->isVisible())
_console->render();
#ifdef OPENSPACE_MODULE_ONSCREENGUI_ENABLED
if (_gui->isEnabled())
_gui->endFrame();
}
#endif
}
}
void OpenSpaceEngine::postDraw() {
_renderEngine->postDraw();
bool showGui = _windowWrapper->hasGuiWindow() ? _windowWrapper->isGuiWindow() : true;
if (showGui) {
if (_console->isVisible())
_console->render();
#ifdef OPENSPACE_MODULE_ONSCREENGUI_ENABLED
if (_gui->isEnabled())
_gui->endFrame();
}
#endif
}
void OpenSpaceEngine::keyboardCallback(Key key, KeyModifier mod, KeyAction action) {