Render On-Screne Dashboard also for non-linear projections

This commit is contained in:
Alexander Bock
2018-01-01 13:17:32 -05:00
parent 6f351c0951
commit 4d58a2ae98
5 changed files with 21 additions and 31 deletions

View File

@@ -17,17 +17,6 @@
</SpoutOutputProjection>
</Viewport>
</Window>
<Window fullScreen="false" numberOfSamples="4" name="OpenSpace" tags="GUI">
<Size x="1024" y="1024" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="16.875" left="30.0" right="30.0" up="16.875" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.06">
<Pos x="0.0" y="0.0" z="0.0" />

View File

@@ -94,6 +94,7 @@ public:
void renderVersionInformation();
void renderCameraInformation();
void renderShutdownInformation(float timer, float fullTime);
void renderDashboard();
void postDraw();
// Performance measurements

View File

@@ -1340,6 +1340,7 @@ void OpenSpaceEngine::drawOverlays() {
if (isGuiWindow) {
_renderEngine->renderScreenLog();
_renderEngine->renderVersionInformation();
_renderEngine->renderDashboard();
if (!_shutdown.inShutdown) {
// We render the camera information in the same location as the shutdown info

View File

@@ -583,25 +583,6 @@ void RenderEngine::render(const glm::mat4& sceneMatrix, const glm::mat4& viewMat
_renderer->render(_globalBlackOutFactor, _performanceManager != nullptr);
}
// Print some useful information on the master viewport
if (wrapper.isMaster() && wrapper.isSimpleRendering()) {
std::unique_ptr<performance::PerformanceMeasurement> perf;
if (_performanceManager) {
perf = std::make_unique<performance::PerformanceMeasurement>(
"Main Dashboard::render",
OsEng.renderEngine().performanceManager()
);
}
glm::vec2 penPosition = glm::vec2(
10.f,
fontResolution().y
);
penPosition.y -= OsEng.console().currentHeight();
OsEng.dashboard().render(penPosition);
}
if (_showFrameNumber) {
const glm::vec2 penPosition = glm::vec2(
fontResolution().x / 2 - 50,
@@ -654,6 +635,24 @@ void RenderEngine::renderShutdownInformation(float timer, float fullTime) {
);
}
void RenderEngine::renderDashboard() {
std::unique_ptr<performance::PerformanceMeasurement> perf;
if (_performanceManager) {
perf = std::make_unique<performance::PerformanceMeasurement>(
"Main Dashboard::render",
OsEng.renderEngine().performanceManager()
);
}
glm::vec2 penPosition = glm::vec2(
10.f,
fontResolution().y
);
penPosition.y -= OsEng.console().currentHeight();
OsEng.dashboard().render(penPosition);
}
void RenderEngine::postDraw() {
Time& currentTime = OsEng.timeManager().time();
if (currentTime.timeJumped()) {