Commit da4ebdce authored by Jan Möbius's avatar Jan Möbius

Always try to get stereo mode



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5000 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b4109e5f
......@@ -157,9 +157,9 @@ void Core::readApplicationOptions(INIFile& _ini) {
//============================================================================
// Load the stereo mode setting
//============================================================================
bool stereo = false;
if ( _ini.get_entry( stereo, "Options" , "Stereo") )
OpenFlipper::Options::stereo(stereo);
//bool stereo = false;
//if ( _ini.get_entry( stereo, "Options" , "Stereo") )
// OpenFlipper::Options::stereo(stereo);
//============================================================================
// Load the setting for the loger window
......@@ -284,25 +284,25 @@ void Core::readApplicationOptions(INIFile& _ini) {
if ( _ini.section_exists("ViewerProperties") ){
for ( unsigned int i = 0 ; i < viewerCount; ++i ) {
if (OpenFlipper::Options::examinerWidgets() < i)
break;
// Load the animation setting
bool animation = false;
if ( _ini.get_entry( animation, "ViewerProperties" , "Animation" + QString::number(i) ) )
PluginFunctions::viewerProperties(i).animation(animation);
// Load the twoSidedLighting setting
bool twoSidedLighting = false;
if ( _ini.get_entry( twoSidedLighting, "ViewerProperties" , "TwoSidedLighting" + QString::number(i)) )
PluginFunctions::viewerProperties(i).twoSidedLighting(twoSidedLighting);
// Load the backface culling setting
bool backface_culling = false;
if ( _ini.get_entry( backface_culling, "ViewerProperties" , "BackfaceCulling" + QString::number(i)) )
PluginFunctions::viewerProperties(i).backFaceCulling(backface_culling);
// Load the setting for the background color option
uint viewerBackground = 0;
if ( _ini.get_entry( viewerBackground, "ViewerProperties" , "BackgroundColor" + QString::number(i)) )
......@@ -480,7 +480,7 @@ void Core::writeApplicationOptions(INIFile& _ini) {
_ini.add_entry("Options","DefaultBaseColor", (uint)OpenFlipper::Options::defaultBaseColor().rgba () );
}
_ini.add_entry("Options","Stereo",OpenFlipper::Options::stereo() );
// _ini.add_entry("Options","Stereo",OpenFlipper::Options::stereo() );
}
void Core::openIniFile( QString _filename,
......
......@@ -121,7 +121,7 @@ CSimpleOpt::SOption g_rgOptions[] = {
{ OPT_HELP , (char*) "-?" , SO_NONE },
{ OPT_HELP , (char*) "--help" , SO_NONE },
{ OPT_HELP , (char*) "-h" , SO_NONE },
{ OPT_STEREO , (char*) "--enable-stereo" , SO_NONE },
{ OPT_STEREO , (char*) "--disable-stereo" , SO_NONE },
{ OPT_BATCH , (char*) "-b" , SO_NONE },
{ OPT_CONSOLE_LOG , (char*) "-c" , SO_NONE },
{ OPT_CONSOLE_LOG , (char*) "--log-to-console" , SO_NONE },
......@@ -228,7 +228,7 @@ bool parseCommandLineOptions(CSimpleOpt& args){
OpenFlipper::Options::debug(true);
break;
case OPT_STEREO:
OpenFlipper::Options::stereo(true);
OpenFlipper::Options::stereo(false);
break;
case OPT_HIDDDEN_TOOLBOX:
OpenFlipper::Options::hideToolbox(true);
......@@ -276,7 +276,7 @@ int main(int argc, char **argv)
}
}
}
OpenFlipper::Options::argc(&argc);
OpenFlipper::Options::argv(&argv);
......
......@@ -89,7 +89,7 @@ static Experience experienceLevel_ = NOVICE;
static bool nogui_ = false;
/// Store the stereo mode
static bool stereo_ = false;
static bool stereo_ = true;
/// Store the synchronization mode
static bool synchronization_ = false;
......
......@@ -118,10 +118,12 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
glView_ = new QtGLGraphicsView(stackedWidget_);
glScene_ = new QtGLGraphicsScene (&examiner_widgets_, baseLayout_);
// is stereo possible ?
if (format.stereo())
std::cerr << "Stereo buffer requested: "
<< (glWidget_->format().stereo() ? "ok\n" : "failed\n");
// is stereo possible, use it?
if (format.stereo()) {
std::cerr << "Stereo buffer requested: " << (glWidget_->format().stereo() ? "ok\n" : "failed\n");
OpenFlipper::Options::stereo(glWidget_->format().stereo());
}
glView_->setViewport(glWidget_);
glView_->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
......
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