Allow access to the console through OpenSpaceEngine

Enable scripting for showing/hiding the console
This commit is contained in:
Alexander Bock
2014-11-18 19:39:25 +01:00
parent e630f6efbb
commit 432266ee6a
4 changed files with 98 additions and 15 deletions
+6 -1
View File
@@ -26,8 +26,10 @@
#define __OPENSPACEENGINE_H__
#include <openspace/interaction/interactionhandler.h>
#include <openspace/interaction/luaconsole.h>
#include <openspace/rendering/renderengine.h>
#include <openspace/engine/configurationmanager.h>
#include <ghoul/cmdparser/commandlineparser.h>
namespace openspace {
@@ -55,6 +57,7 @@ public:
interaction::InteractionHandler& interactionHandler();
RenderEngine& renderEngine();
scripting::ScriptEngine& scriptEngine();
LuaConsole& console();
// SGCT callbacks
bool initializeGL();
@@ -71,6 +74,8 @@ public:
void encode();
void decode();
private:
OpenSpaceEngine(std::string programName);
~OpenSpaceEngine();
@@ -88,10 +93,10 @@ private:
RenderEngine _renderEngine;
scripting::ScriptEngine _scriptEngine;
ghoul::cmdparser::CommandlineParser _commandlineParser;
LuaConsole _console;
SyncBuffer* _syncBuffer;
LuaConsole* _console;
};
#define OsEng (openspace::OpenSpaceEngine::ref())