mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
- 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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user