- Correctly detect isRegularRendering flag

- Render GUI in the PostDraw function in order render it not on the cubefaces

Closes #259
This commit is contained in:
Alexander Bock
2017-04-20 18:00:31 -04:00
parent 99a128b945
commit 4511d09b10
2 changed files with 11 additions and 9 deletions
+5 -2
View File
@@ -120,11 +120,14 @@ OnScreenGUIModule::OnScreenGUIModule()
);
OsEng.registerModuleCallback(
OpenSpaceEngine::CallbackOption::Render,
// This is done in the PostDraw phase so that it will render it on top of
// everything else in the case of fisheyes. With this being in the Render callback
// the GUI would be rendered on top of each of the cube faces
OpenSpaceEngine::CallbackOption::PostDraw,
[](){
WindowWrapper& wrapper = OsEng.windowWrapper();
bool showGui = wrapper.hasGuiWindow() ? wrapper.isGuiWindow() : true;
if (wrapper.isMaster() && wrapper.isRegularRendering() && showGui ) {
if (wrapper.isMaster() && showGui ) {
glm::vec2 mousePosition = wrapper.mousePosition();
//glm::ivec2 drawBufferResolution = _windowWrapper->currentDrawBufferResolution();
glm::ivec2 windowSize = wrapper.currentWindowSize();