fgviewer: support random objects, vegetation, and static models
This commit is contained in:
parent
8cf74b8f2d
commit
8bac481865
1 changed files with 4 additions and 1 deletions
|
@ -40,7 +40,8 @@ public:
|
|||
{
|
||||
try {
|
||||
SGSharedPtr<SGPropertyNode> prop = new SGPropertyNode;
|
||||
return simgear::SGModelLib::loadModel(modelPath, prop);
|
||||
return simgear::SGModelLib::loadModel(modelPath,
|
||||
globals->get_props());
|
||||
} catch (...) {
|
||||
std::cerr << "Error loading \"" << modelPath << "\"" << std::endl;
|
||||
return 0;
|
||||
|
@ -223,6 +224,8 @@ fgviewerMain(int argc, char** argv)
|
|||
SGReaderWriterBTGOptions* btgOptions = new SGReaderWriterBTGOptions;
|
||||
btgOptions->getDatabasePathList() = filePathList;
|
||||
btgOptions->setMatlib(globals->get_matlib());
|
||||
btgOptions->setUseRandomObjects(fgGetBool("/sim/rendering/random-objects", false));
|
||||
btgOptions->setUseRandomVegetation(fgGetBool("/sim/rendering/random-vegetation", false));
|
||||
|
||||
// read the scene from the list of file specified command line args.
|
||||
osg::ref_ptr<osg::Node> loadedModel;
|
||||
|
|
Loading…
Reference in a new issue