Show
Ignore:
Timestamp:
08/26/05 15:26:02 (9 years ago)
Author:
robert
Message:

Added --num-components <num> option.

Files:
1 modified

Legend:

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

    r4135 r4465  
    11431143    arguments.getApplicationUsage()->addCommandLineOption("--t_maxTextureSize <size>","Set the texture maximum resolution in the t (y) dimension."); 
    11441144    arguments.getApplicationUsage()->addCommandLineOption("--r_maxTextureSize <size>","Set the texture maximum resolution in the r (z) dimension."); 
    1145     arguments.getApplicationUsage()->addCommandLineOption("--compressed","Enable the usage of compressed textures"); 
    1146     arguments.getApplicationUsage()->addCommandLineOption("--compressed-arb","Enable the usage of OpenGL ARB compressed textures"); 
    1147     arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt1","Enable the usage of S3TC DXT1 compressed textures"); 
    1148     arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt3","Enable the usage of S3TC DXT3 compressed textures"); 
    1149     arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt5","Enable the usage of S3TC DXT5 compressed textures"); 
     1145    arguments.getApplicationUsage()->addCommandLineOption("--compressed","Enable the usage of compressed textures."); 
     1146    arguments.getApplicationUsage()->addCommandLineOption("--compressed-arb","Enable the usage of OpenGL ARB compressed textures."); 
     1147    arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt1","Enable the usage of S3TC DXT1 compressed textures."); 
     1148    arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt3","Enable the usage of S3TC DXT3 compressed textures."); 
     1149    arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt5","Enable the usage of S3TC DXT5 compressed textures."); 
    11501150    arguments.getApplicationUsage()->addCommandLineOption("--modulate-alpha-by-luminance","For each pixel multiple the alpha value by the luminance."); 
    1151     arguments.getApplicationUsage()->addCommandLineOption("--replace-alpha-with-luminance","For each pixel mSet the alpha value to the luminance"); 
     1151    arguments.getApplicationUsage()->addCommandLineOption("--replace-alpha-with-luminance","For each pixel mSet the alpha value to the luminance."); 
     1152    arguments.getApplicationUsage()->addCommandLineOption("--num-components <num>","Set the number of components to in he target image."); 
    11521153//    arguments.getApplicationUsage()->addCommandLineOption("--raw <sizeX> <sizeY> <sizeZ> <numberBytesPerComponent> <numberOfComponents> <endian> <filename>","read a raw image data"); 
    11531154 
     
    12261227         
    12271228     
     1229    unsigned int numComponentsDesired = 0;  
     1230    while(arguments.read("--num-components", numComponentsDesired)) {} 
     1231 
     1232 
    12281233    osg::ref_ptr<osg::Image> image_3d; 
    12291234 
     
    12511256        // pack the textures into a single texture. 
    12521257        ProcessRow processRow; 
    1253         image_3d = createTexture3D(imageList, processRow, 0, s_maximumTextureSize, t_maximumTextureSize, r_maximumTextureSize); 
     1258        image_3d = createTexture3D(imageList, processRow, numComponentsDesired, s_maximumTextureSize, t_maximumTextureSize, r_maximumTextureSize); 
    12541259    } 
    12551260