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/osgclip/osgclip.cpp

    r1747 r1815  
    132132 
    133133    // set up the usage document, in case we need to print out how to use this program. 
    134     arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); 
     134    arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); 
    135135    arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); 
    136136    
     
    158158    { 
    159159        arguments.writeErrorMessages(std::cout); 
     160        return 1; 
     161    } 
     162     
     163    if (arguments.argc()<=1) 
     164    { 
     165        arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION); 
    160166        return 1; 
    161167    }