Added help support for display help on screen to osgProducer::Viewer.

This commit is contained in:
Robert Osfield
2003-03-26 12:50:30 +00:00
parent e00b8f2868
commit 8779fe20a7
18 changed files with 370 additions and 39 deletions

View File

@@ -100,7 +100,7 @@ class ConstructStateCallback : public osgProducer::OsgCameraGroup::RealizeCallba
return stateset;
}
virtual void operator()(const Producer::RenderSurface&, osgProducer::OsgCameraGroup* , osgProducer::OsgSceneHandler* sh)
virtual void operator()( osgProducer::OsgCameraGroup&, osgProducer::OsgSceneHandler& sh, const Producer::RenderSurface& )
{
if (!_initialized)
{
@@ -111,7 +111,7 @@ class ConstructStateCallback : public osgProducer::OsgCameraGroup::RealizeCallba
if (_node) _node->setStateSet(constructState());
}
// now safe to con
sh->init();
sh.init();
}

View File

@@ -20,6 +20,8 @@ int main( int argc, char **argv )
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicatonName(arguments.getProgramName());
arguments.getApplicationUsage()->setDescription(arguments.getProgramName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");