Show
Ignore:
Timestamp:
04/06/03 23:32:44 (11 years ago)
Author:
robert
Message:

Added the usage report to the examples for when no arguments are passed
to the examples.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osggeodemo/osggeodemo.cpp

    r1747 r1815  
    9090 
    9191    // set up the usage document, in case we need to print out how to use this program. 
    92     arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); 
     92    arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); 
    9393    arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); 
    9494    arguments.getApplicationUsage()->addCommandLineOption("--fov <float>","Set the Field of View"); 
     
    120120    { 
    121121        arguments.writeErrorMessages(std::cout); 
     122        return 1; 
     123    } 
     124     
     125    if (arguments.argc()<=1) 
     126    { 
     127        arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION); 
    122128        return 1; 
    123129    }