From 1fdb60f6799610254d8de1bc838f4df2aac1d6bf Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Mon, 16 Apr 2018 16:38:10 +0200 Subject: [PATCH] Remove LoadingScreen from the ABI. --- src/fmri/RenderingState.cpp | 35 +++++++++++++++++------------------ src/fmri/RenderingState.hpp | 2 -- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/fmri/RenderingState.cpp b/src/fmri/RenderingState.cpp index 5e3f6b3..8cb5bc7 100644 --- a/src/fmri/RenderingState.cpp +++ b/src/fmri/RenderingState.cpp @@ -42,6 +42,23 @@ static void updatePointSize(float dir) glPointSize(std::max(1.f, size)); } +static void renderLoadingScreen() +{ + glLoadIdentity(); + glTranslatef(0, 0, -4); + glRotatef(360 * getAnimationStep(std::chrono::seconds(4)), 0, 1, 0); + glColor3f(1, 1, 1); + glutWireTeapot(1); + + auto pulse = std::cos(2 * M_PI * getAnimationStep(std::chrono::seconds(3))); + pulse *= pulse; + glColor3d(pulse, pulse, 0); + glLoadIdentity(); + setOrthographicProjection(); + renderText("Loading...", 5, 15); + restorePerspectiveProjection(); +} + void RenderingState::move(unsigned char key, bool sprint) { float speed = 0.5f; @@ -299,24 +316,6 @@ void RenderingState::renderVisualisation(float time) const renderOverlayText(); } -void RenderingState::renderLoadingScreen() const -{ - glLoadIdentity(); - glTranslatef(0, 0, -4); - glRotatef(360 * getAnimationStep(std::chrono::seconds(4)), 0, 1, 0); - glColor3f(1, 1, 1); - glutWireTeapot(1); - - - auto pulse = std::cos(2 * M_PI * getAnimationStep(std::chrono::seconds(3))); - pulse *= pulse; - glColor3d(pulse, pulse, 0); - glLoadIdentity(); - setOrthographicProjection(); - renderText("Loading...", 5, 15); - restorePerspectiveProjection(); -} - void RenderingState::drawLayer(float time, unsigned long i) const { glPushMatrix(); diff --git a/src/fmri/RenderingState.hpp b/src/fmri/RenderingState.hpp index eb7c433..0d4a081 100644 --- a/src/fmri/RenderingState.hpp +++ b/src/fmri/RenderingState.hpp @@ -99,8 +99,6 @@ namespace fmri void queueUpdate(); - void renderLoadingScreen() const; - void renderVisualisation(float time) const; void loadGLItems();