Commit 05e1a82f authored by Martin Schultz's avatar Martin Schultz

added Commandlineoption for opengl stereo buffer creation

parent 2cb94c25
......@@ -357,6 +357,9 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err
QCommandLineOption samplesOption("samples",QCoreApplication::translate("main","Overwrite multisampling sample count"),QCoreApplication::translate("main","< 0 | 1 | 2 | ... | 16 >"));
parser.addOption(samplesOption);
QCommandLineOption glStereoOption("glStereo",QCoreApplication::translate("main","Overwrite OpenGL Stereo setting"),QCoreApplication::translate("main","< true | false >"));
parser.addOption(glStereoOption);
QCommandLineOption profileOption("profile",QCoreApplication::translate("main","Request OpenGL context profile <profile> with profile set as compat or core"),QCoreApplication::translate("main","< compat | core >"));
parser.addOption(profileOption);
const QCommandLineOption helpOption = parser.addHelpOption();
......@@ -431,6 +434,9 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err
OpenFlipper::Options::glVersion(version,true);
}
if(parser.isSet("glStereo"))
OpenFlipper::Options::glStereo(parser.value("glStereo")=="true");
if(parser.value(profileOption)=="core")
{
OpenFlipper::Options::coreProfile(true, true);
......@@ -545,6 +551,7 @@ int main(int argc, char **argv)
format.setOption(format.options() | QSurfaceFormat::DebugContext);
format.setSamples(OpenFlipper::Options::samples());
format.setStereo(OpenFlipper::Options::glStereo());
QSurfaceFormat::setDefaultFormat(format);
......
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