Added default file load to avoid the need for command line option.

This commit is contained in:
Robert Osfield
2007-06-08 12:13:33 +00:00
parent 3e8be9ac7d
commit b3cec3d986
5 changed files with 38 additions and 5 deletions

View File

@@ -152,6 +152,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("cow.osg");
if (!rootnode)
{
osg::notify(osg::NOTICE)<<"Please specify a file on the command line"<<std::endl;