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

    r1814 r1815  
    100100     
    101101    // set up the usage document, in case we need to print out how to use this program. 
    102     arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); 
     102    arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); 
    103103    arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); 
    104104    arguments.getApplicationUsage()->addCommandLineOption("-m","Set viewer to MASTER mode, sending view via packets."); 
     
    147147    { 
    148148        arguments.writeErrorMessages(std::cout); 
     149        return 1; 
     150    } 
     151     
     152    if (arguments.argc()<=1) 
     153    { 
     154        arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION); 
    149155        return 1; 
    150156    }