mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
Fix viewport & window issues (#2630)
* Add support for multiple windows & viewports With correct rendering of both Scene and Overlays/GUI. GUI is restricted to either the first window or any other windows tagged with "GUI", overlays are drawn on all windows/viewports. Closes #2542 and #1645
This commit is contained in:
@@ -89,6 +89,7 @@ public:
|
||||
void deinitializeGL();
|
||||
void preSynchronization();
|
||||
void postSynchronizationPreDraw();
|
||||
void viewportChanged();
|
||||
void render(const glm::mat4& sceneMatrix, const glm::mat4& viewMatrix,
|
||||
const glm::mat4& projectionMatrix);
|
||||
void drawOverlays();
|
||||
|
||||
@@ -62,8 +62,14 @@ struct WindowDelegate {
|
||||
|
||||
glm::ivec2 (*currentViewportSize)() = []() { return glm::ivec2(0); };
|
||||
|
||||
glm::ivec2(*currentViewportResolution)() = []() { return glm::ivec2(0); };
|
||||
|
||||
glm::vec2 (*dpiScaling)() = []() { return glm::vec2(1.f); };
|
||||
|
||||
glm::ivec2(*firstWindowResolution)() = []() { return glm::ivec2(0); };
|
||||
|
||||
glm::ivec2(*guiWindowResolution)() = []() { return glm::ivec2(0); };
|
||||
|
||||
float (*osDpiScaling)() = []() { return 1.f; };
|
||||
|
||||
bool (*hasGuiWindow)() = []() { return false; };
|
||||
@@ -89,6 +95,8 @@ struct WindowDelegate {
|
||||
|
||||
int (*currentWindowId)() = []() { return 0; };
|
||||
|
||||
int (*firstWindowId)() = []() { return 0; };
|
||||
|
||||
double (*getHorizFieldOfView)() = []() { return 0.0; };
|
||||
|
||||
void (*setHorizFieldOfView)(float hFovDeg) = [](float) { };
|
||||
@@ -113,6 +121,9 @@ struct WindowDelegate {
|
||||
int (*numberOfNodes)() = []() { return 0; };
|
||||
|
||||
int (*currentNode)() = []() { return 0; };
|
||||
|
||||
glm::vec2 (*mousePositionViewportRelative)(glm::vec2 mousePosition) =
|
||||
[](glm::vec2) { return glm::vec2(0); };
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user