- Timestamp:
- 06/08/07 14:15:16 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgfxbrowser/osgfxbrowser.cpp
r6835 r6909 312 312 } 313 313 314 if (arguments.argc() <= 1) {315 arguments.getApplicationUsage()->write(std::cout, osg::ApplicationUsage::COMMAND_LINE_OPTION);316 return 1;317 }318 319 osg::Timer timer;320 osg::Timer_t start_tick = timer.tick();321 322 314 // read the scene from the list of file specified commandline args. 323 315 osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments); 324 316 325 // if no model has been successfully loaded report failure. 326 if (!loadedModel) { 327 std::cout << arguments.getApplicationName() << ": No data loaded" << std::endl; 317 // if not loaded assume no arguments passed in, try use default mode instead. 318 if (!loadedModel) loadedModel = osgDB::readNodeFile("dumptruck.osg"); 319 320 if (!loadedModel) 321 { 322 std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl; 328 323 return 1; 329 324 } 330 331 osg::Timer_t end_tick = timer.tick();332 333 std::cout << "Time to load = " << timer.delta_s(start_tick,end_tick) << std::endl;334 325 335 326 // optimize the scene graph, remove rendundent nodes and state etc.
