1
0
Fork 0

VPB: Initial Commit

Not for LTS
This commit is contained in:
Scott Giese 2020-06-28 11:34:37 -05:00
parent de89d72593
commit 034c9f4c86

View file

@ -286,6 +286,11 @@ public:
// badly named property, this is what is set by --enable/disable-clouds
fgGetNode("/environment/clouds/status")->addChangeListener(this);
auto vpb_active = fgGetNode("/scenery/use-vpb");
vpb_active->addChangeListener(this);
SGSceneFeatures::instance()->setVPBActive(vpb_active->getBoolValue());
// SGSceneFeatures::instance()->setVPBActive(true);
}
~ScenerySwitchListener()
@ -297,6 +302,7 @@ public:
fgGetNode("/sim/rendering/draw-otw")->removeChangeListener(this);
fgGetNode("/environment/clouds/status")->removeChangeListener(this);
fgGetNode("/scenery/use-vpb")->removeChangeListener(this);
}
virtual void valueChanged (SGPropertyNode * node)
@ -304,7 +310,9 @@ public:
bool b = node->getBoolValue();
std::string name(node->getNameString());
if (name == "terrain") {
if (name == "use-vpb") {
SGSceneFeatures::instance()->setVPBActive(b);
} else if (name == "terrain") {
_scenery->scene_graph->setChildValue(_scenery->terrain_branch, b);
} else if (name == "models") {
_scenery->scene_graph->setChildValue(_scenery->models_branch, b);