Rendering ImGui, ScreenLog, and Information as a post-processing step to make it work in fisheye rendering (closing #119)

Disable SGCT ESC terminate handling and implement a method that optionally waits before closing the application (closing #120)
 - ESC key is now bound to a call to "openspace.toggleShutdown()" that will initiate a shutdown in 3 seconds unless ESC is pressed again
 - The countdown timer is set in the openspace.cfg
This commit is contained in:
Alexander Bock
2016-07-17 02:33:45 +02:00
parent 5c95c34752
commit 6d8a16f19e
14 changed files with 133 additions and 16 deletions

View File

@@ -28,6 +28,8 @@
#include <openspace/util/keys.h>
#include <openspace/util/mouse.h>
#include <openspace/scripting/scriptengine.h>
#include <ghoul/glm.h>
#include <ghoul/misc/dictionary.h>
@@ -55,7 +57,7 @@ class SettingsEngine;
namespace interaction { class InteractionHandler; }
namespace gui { class GUI; }
namespace scripting { class ScriptEngine; }
//namespace scripting { class ScriptEngine; }
namespace network { class ParallelConnection; }
namespace properties { class PropertyOwner; }
@@ -110,8 +112,16 @@ public:
void enableBarrier();
void disableBarrier();
void toggleShutdownMode();
void runPostInitializationScripts(const std::string& sceneDescription);
/**
* Returns the Lua library that contains all Lua functions available to affect the
* application.
*/
static scripting::ScriptEngine::LuaLibrary luaLibrary();
private:
OpenSpaceEngine(std::string programName, std::unique_ptr<WindowWrapper> windowWrapper);
~OpenSpaceEngine();
@@ -149,6 +159,14 @@ private:
bool _isMaster;
double _runTime;
// Whether the application is currently in shutdown mode (i.e. counting down the timer
// and closing it at '0'
bool _isInShutdownMode;
// The total amount of time the application will wait before actually shutting down
float _shutdownWait;
// The current state of the countdown; if it reaches '0', the application will close
float _shutdownCountdown;
static OpenSpaceEngine* _engine;
};