From Martin Lavery and Robert Osfield, added fallbacks for when now command line args are provided.

This commit is contained in:
Robert Osfield
2007-06-08 15:37:20 +00:00
parent c4b1c27a31
commit ce0f30cfcb
14 changed files with 48 additions and 3 deletions

View File

@@ -27,6 +27,10 @@ int main( int argc, char **argv )
// load the nodes from the commandline arguments.
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
// if not loaded assume no arguments passed in, try use default mode instead.
if (!rootnode) rootnode = osgDB::readNodeFile("cessnafire.osg");
if (!rootnode)
{
osg::notify(osg::NOTICE)<<"Please specify and model filename on the command line."<<std::endl;