From 2981a52b057cfa257dc9885d7eec56effe4e89f1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 23 Feb 2011 11:43:30 +0000 Subject: [PATCH] Added error reporting for old options --- examples/osgvolume/osgvolume.cpp | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/examples/osgvolume/osgvolume.cpp b/examples/osgvolume/osgvolume.cpp index d58d6af9c..35ccec0cf 100644 --- a/examples/osgvolume/osgvolume.cpp +++ b/examples/osgvolume/osgvolume.cpp @@ -972,7 +972,6 @@ int main( int argc, char **argv ) arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates use of 3D textures."); arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - arguments.getApplicationUsage()->addCommandLineOption("-s ","Number of slices to create."); arguments.getApplicationUsage()->addCommandLineOption("--images [filenames]","Specify a stack of 2d images to build the 3d volume from."); arguments.getApplicationUsage()->addCommandLineOption("--shader","Use OpenGL Shading Language. (default)"); arguments.getApplicationUsage()->addCommandLineOption("--no-shader","Disable use of OpenGL Shading Language."); @@ -985,10 +984,6 @@ int main( int argc, char **argv ) arguments.getApplicationUsage()->addCommandLineOption("--xSize ","Relative width of rendered brick."); arguments.getApplicationUsage()->addCommandLineOption("--ySize ","Relative length of rendered brick."); arguments.getApplicationUsage()->addCommandLineOption("--zSize ","Relative height of rendered brick."); - arguments.getApplicationUsage()->addCommandLineOption("--xMultiplier ","Tex coord x mulitplier."); - arguments.getApplicationUsage()->addCommandLineOption("--yMultiplier ","Tex coord y mulitplier."); - arguments.getApplicationUsage()->addCommandLineOption("--zMultiplier ","Tex coord z mulitplier."); - arguments.getApplicationUsage()->addCommandLineOption("--clip ","clip volume as a ratio, 0.0 clip all, 1.0 clip none."); arguments.getApplicationUsage()->addCommandLineOption("--maxTextureSize ","Set the texture maximum resolution in the s,t,r (x,y,z) dimensions."); arguments.getApplicationUsage()->addCommandLineOption("--s_maxTextureSize ","Set the texture maximum resolution in the s (x) dimension."); arguments.getApplicationUsage()->addCommandLineOption("--t_maxTextureSize ","Set the texture maximum resolution in the t (y) dimension."); @@ -1068,12 +1063,29 @@ int main( int argc, char **argv ) transferFunction->assign(transferFunction->getColorMap()); } - unsigned int numSlices=500; - while (arguments.read("-s",numSlices)) {} + { + // deprecated options + bool invalidOption = false; + + unsigned int numSlices=500; + while (arguments.read("-s",numSlices)) { OSG_NOTICE<<"Warning: -s option no longer supported."<