更新 'src/Viewer/fg_os_osgviewer.cxx'
This commit is contained in:
@@ -141,24 +141,6 @@ static void setStereoMode(const char* mode)
|
|||||||
//zhongjin
|
//zhongjin
|
||||||
SG_LOG(SG_VIEW, SG_INFO, "立体模式: " << mode);
|
SG_LOG(SG_VIEW, SG_INFO, "立体模式: " << mode);
|
||||||
|
|
||||||
if (stereoOn) {
|
|
||||||
SG_LOG(SG_VIEW, SG_INFO, "修改立体参数");
|
|
||||||
std::string cmode;
|
|
||||||
cmode = fgGetString("/sim/current-view/name", "飞行员");
|
|
||||||
SG_LOG(SG_VIEW, SG_INFO, "当前视角: " << cmode);
|
|
||||||
|
|
||||||
fgSetFloat("/sim/rendering/osg-displaysettings/screen-distance",30);
|
|
||||||
|
|
||||||
if ( cmode =="飞行员" || cmode == "副驾驶" || cmode== "领航" || cmode== "货仓" || cmode== "") {
|
|
||||||
fgSetFloat("/sim/rendering/osg-displaysettings/screen-distance",0.6);
|
|
||||||
} else {
|
|
||||||
fgSetFloat("/sim/rendering/osg-displaysettings/screen-distance",30);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DisplaySettings::instance()->setStereo(stereoOn);
|
DisplaySettings::instance()->setStereo(stereoOn);
|
||||||
DisplaySettings::instance()->setStereoMode(stereoMode);
|
DisplaySettings::instance()->setStereoMode(stereoMode);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user