1
0
Fork 0

Toggle tree effect on /sim/rendering/random-vegetation property

This commit is contained in:
timoore 2008-02-07 23:02:51 +00:00
parent 5253a271c7
commit f6723429a0

View file

@ -266,6 +266,9 @@ bool FGTileEntry::obj_load( const string& path,
{
bool use_random_objects =
fgGetBool("/sim/rendering/random-objects", true);
bool use_random_vegetation =
fgGetBool("/sim/rendering/random-vegetation", true);
// try loading binary format
osg::ref_ptr<SGReaderWriterBTGOptions> options
@ -273,6 +276,7 @@ bool FGTileEntry::obj_load( const string& path,
options->setMatlib(globals->get_matlib());
options->setCalcLights(is_base);
options->setUseRandomObjects(use_random_objects);
options->setUseRandomVegetation(use_random_vegetation);
osg::Node* node = osgDB::readNodeFile(path, options.get());
if (node)
geometry->addChild(node);