Feature/globals (#690)

* Move global objects out of OpenSpaceEngine
 * General cleanup of main.cpp
 * Add default_joystick asset to all scenes
 * No longer suppress mouse interaction on slave nodes
 * Window delegate uses function pointers rather than subclassing
 * Fix for false overwriting of ImGUI configuration file
 * Change default color and tilt angle of fisheye rendering
 * Restructured performance manager
 * Simplify screenshot handling
This commit is contained in:
Alexander Bock
2018-08-30 11:38:47 -04:00
committed by GitHub
parent c287c03fe8
commit 9f1c4e847d
177 changed files with 3103 additions and 3952 deletions
@@ -26,7 +26,7 @@
#include <openspace/documentation/documentation.h>
#include <openspace/documentation/verifier.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/engine/globals.h>
#include <openspace/network/parallelconnection.h>
#include <openspace/network/parallelpeer.h>
#include <openspace/scene/scenegraphnode.h>
@@ -98,7 +98,7 @@ DashboardItemParallelConnection::DashboardItemParallelConnection(
_fontName = dictionary.value<std::string>(FontNameInfo.identifier);
}
_fontName.onChange([this](){
_font = OsEng.fontManager().font(_fontName, _fontSize);
_font = global::fontManager.font(_fontName, _fontSize);
});
addProperty(_fontName);
@@ -108,17 +108,17 @@ DashboardItemParallelConnection::DashboardItemParallelConnection(
);
}
_fontSize.onChange([this](){
_font = OsEng.fontManager().font(_fontName, _fontSize);
_font = global::fontManager.font(_fontName, _fontSize);
});
addProperty(_fontSize);
_font = OsEng.fontManager().font(_fontName, _fontSize);
_font = global::fontManager.font(_fontName, _fontSize);
}
void DashboardItemParallelConnection::render(glm::vec2& penPosition) {
const ParallelConnection::Status status = OsEng.parallelPeer().status();
const size_t nConnections = OsEng.parallelPeer().nConnections();
const std::string& hostName = OsEng.parallelPeer().hostName();
const ParallelConnection::Status status = global::parallelPeer.status();
const size_t nConnections = global::parallelPeer.nConnections();
const std::string& hostName = global::parallelPeer.hostName();
std::string connectionInfo;
int nClients = static_cast<int>(nConnections);
@@ -166,9 +166,9 @@ void DashboardItemParallelConnection::render(glm::vec2& penPosition) {
}
glm::vec2 DashboardItemParallelConnection::size() const {
ParallelConnection::Status status = OsEng.parallelPeer().status();
size_t nConnections = OsEng.parallelPeer().nConnections();
const std::string& hostName = OsEng.parallelPeer().hostName();
ParallelConnection::Status status = global::parallelPeer.status();
size_t nConnections = global::parallelPeer.nConnections();
const std::string& hostName = global::parallelPeer.hostName();
std::string connectionInfo;
int nClients = static_cast<int>(nConnections);