mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Enable setting the capabilities verbosity using the configuration file
This commit is contained in:
@@ -53,7 +53,7 @@ std::pair<int, int> supportedOpenGLVersion () {
|
||||
//On OS X we need to explicitly set the version and specify that we are using CORE profile
|
||||
//to be able to use glGetIntegerv(GL_MAJOR_VERSION, &major) and glGetIntegerv(GL_MINOR_VERSION, &minor)
|
||||
//explicitly setting to OGL 3.3 CORE works since all Mac's now support at least 3.3
|
||||
#if __APPLE__
|
||||
#ifdef __APPLE__
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
||||
|
||||
@@ -49,6 +49,7 @@ public:
|
||||
static const std::string KeyLogLevel;
|
||||
static const std::string KeyLogImmediateFlush;
|
||||
static const std::string KeyLogs;
|
||||
static const std::string KeyCapabilitiesVerbosity;
|
||||
static const std::string KeyDisableMasterRendering;
|
||||
static const std::string KeyDownloadRequestURL;
|
||||
|
||||
|
||||
@@ -306,6 +306,7 @@ void ImageSequencer2::runSequenceParser(SequenceParser* parser){
|
||||
std::vector<double> in5 = parser->getCaptureProgression();
|
||||
|
||||
// check for sanity
|
||||
// TODO: This cannot crash the program! ---abock
|
||||
ghoul_assert(in1.size() > 0, "Sequencer failed to load Translation" );
|
||||
ghoul_assert(in2.size() > 0, "Sequencer failed to load Image data" );
|
||||
ghoul_assert(in3.size() > 0, "Sequencer failed to load Instrument Switching schedule");
|
||||
|
||||
@@ -57,6 +57,7 @@ const std::string ConfigurationManager::KeySpiceLeapsecondKernel = "SpiceKernel.
|
||||
const std::string ConfigurationManager::KeyLogLevel = "Logging.LogLevel";
|
||||
const std::string ConfigurationManager::KeyLogImmediateFlush = "Logging.ImmediateFlush";
|
||||
const std::string ConfigurationManager::KeyLogs = "Logging.Logs";
|
||||
const std::string ConfigurationManager::KeyCapabilitiesVerbosity = "Logging.CapabilitiesVerbosity";
|
||||
const std::string ConfigurationManager::KeyDisableMasterRendering = "DisableRenderingOnMaster";
|
||||
const std::string ConfigurationManager::KeyDownloadRequestURL = "DownloadRequestURL";
|
||||
|
||||
|
||||
@@ -288,7 +288,21 @@ bool OpenSpaceEngine::initialize() {
|
||||
SysCap.addComponent(new ghoul::systemcapabilities::GeneralCapabilitiesComponent);
|
||||
SysCap.addComponent(new ghoul::systemcapabilities::OpenGLCapabilitiesComponent);
|
||||
SysCap.detectCapabilities();
|
||||
SysCap.logCapabilities();
|
||||
|
||||
using Verbosity = ghoul::systemcapabilities::SystemCapabilitiesComponent::Verbosity;
|
||||
Verbosity verbosity = Verbosity::Default;
|
||||
if (configurationManager()->hasKeyAndValue<std::string>(ConfigurationManager::KeyCapabilitiesVerbosity)) {
|
||||
std::map<std::string, Verbosity> verbosityMap = {
|
||||
{ "Minimal", Verbosity::Minimal },
|
||||
{ "Default", Verbosity::Default },
|
||||
{ "Full", Verbosity::Full }
|
||||
};
|
||||
|
||||
std::string v = configurationManager()->value<std::string>(ConfigurationManager::KeyCapabilitiesVerbosity);
|
||||
if (verbosityMap.find(v) != verbosityMap.end())
|
||||
verbosity = verbosityMap[v];
|
||||
}
|
||||
SysCap.logCapabilities(verbosity);
|
||||
|
||||
std::string requestURL = "";
|
||||
bool success = configurationManager()->getValue(ConfigurationManager::KeyDownloadRequestURL, requestURL);
|
||||
|
||||
Reference in New Issue
Block a user