Commit 386eb643 authored by Martin Schultz's avatar Martin Schultz
Browse files

added profile option to set OpenGL profile explicitly

parent 0f8c9c75
...@@ -351,6 +351,9 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err ...@@ -351,6 +351,9 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err
QCommandLineOption coreProfileOption("core-profile",QCoreApplication::translate("main", "OpenGL Core Profile Mode")); QCommandLineOption coreProfileOption("core-profile",QCoreApplication::translate("main", "OpenGL Core Profile Mode"));
parser.addOption(coreProfileOption); parser.addOption(coreProfileOption);
QCommandLineOption profileOption("profile",QCoreApplication::translate("main","Request OpenGL context profile <profile> with profile set as compat or core"),QCoreApplication::translate("main","<compat | core >"));
profileOption.setDefaultValue("compat");
parser.addOption(profileOption);
const QCommandLineOption helpOption = parser.addHelpOption(); const QCommandLineOption helpOption = parser.addHelpOption();
const QCommandLineOption versionOption = parser.addVersionOption(); const QCommandLineOption versionOption = parser.addVersionOption();
...@@ -413,6 +416,17 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err ...@@ -413,6 +416,17 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err
OpenFlipper::Options::remoteControl(port.toInt()); OpenFlipper::Options::remoteControl(port.toInt());
} }
if(parser.value(profileOption)=="core")
{
OpenFlipper::Options::coreProfile(true);
}
else
{
if(parser.value(profileOption)=="compat")
{
OpenFlipper::Options::coreProfile(false);
}
}
if(parser.isSet(coreProfileOption)) { if(parser.isSet(coreProfileOption)) {
OpenFlipper::Options::coreProfile(true); OpenFlipper::Options::coreProfile(true);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment