mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-15 08:21:23 -06:00
Replace commandline argument with automatically detecting the supported OpenGL version
This commit is contained in:
@@ -96,7 +96,6 @@ namespace {
|
||||
struct {
|
||||
std::string configurationName;
|
||||
std::string sgctConfigurationName;
|
||||
std::string openGlVersion;
|
||||
} commandlineArgumentPlaceholders;
|
||||
}
|
||||
|
||||
@@ -148,8 +147,7 @@ OpenSpaceEngine& OpenSpaceEngine::ref() {
|
||||
|
||||
bool OpenSpaceEngine::create(
|
||||
int argc, char** argv,
|
||||
std::vector<std::string>& sgctArguments,
|
||||
std::string& openGlVersion)
|
||||
std::vector<std::string>& sgctArguments)
|
||||
{
|
||||
ghoul::initialize();
|
||||
|
||||
@@ -260,10 +258,6 @@ bool OpenSpaceEngine::create(
|
||||
sgctConfigurationPath = commandlineArgumentPlaceholders.sgctConfigurationName;
|
||||
}
|
||||
|
||||
openGlVersion = commandlineArgumentPlaceholders.openGlVersion;
|
||||
if (openGlVersion != DefaultOpenGlVersion)
|
||||
LINFO("Using OpenGL version " << openGlVersion);
|
||||
|
||||
// Prepend the outgoing sgctArguments with the program name
|
||||
// as well as the configuration file that sgct is supposed to use
|
||||
sgctArguments.insert(sgctArguments.begin(), argv[0]);
|
||||
@@ -401,13 +395,6 @@ bool OpenSpaceEngine::gatherCommandlineArguments() {
|
||||
"the OpenSpace configuration file");
|
||||
_commandlineParser->addCommand(sgctConfigFileCommand);
|
||||
|
||||
commandlineArgumentPlaceholders.openGlVersion = DefaultOpenGlVersion;
|
||||
CommandlineCommand* openGlVersionCommand = new SingleCommand<std::string>(
|
||||
&commandlineArgumentPlaceholders.openGlVersion,
|
||||
"-ogl", "-o",
|
||||
"Sets the OpenGL version that is to be used; valid values are '4.2' and '4.3'");
|
||||
_commandlineParser->addCommand(openGlVersionCommand);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user