Show
Ignore:
Timestamp:
11/01/05 20:32:26 (8 years ago)
Author:
robert
Message:

Added an image negation callback to the render to image. Added commandline docs
for the new --image and --texture-rectangle options.

Files:
1 modified

Legend:

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

    r4647 r4649  
    120120        if (_image && _image->getPixelFormat()==GL_RGBA && _image->getDataType()==GL_UNSIGNED_BYTE) 
    121121        { 
    122              
    123122            // we'll pick out the center 1/2 of the whole image, 
    124123            int column_start = _image->s()/4; 
     
    135134                for(int c=column_start; c<column_end; ++c) 
    136135                { 
    137                     (*data) = 255; ++data; 
    138                     (*data) = (*data); ++data; 
    139                     (*data) = (*data); ++data; 
     136                    (*data) = 255-(*data); ++data; 
     137                    (*data) = 255-(*data); ++data; 
     138                    (*data) = 255-(*data); ++data; 
    140139                    (*data) = 255; ++data; 
    141140                } 
     
    347346    arguments.getApplicationUsage()->addCommandLineOption("--pbuffer","Use Pixel Buffer for render to texture, where supported."); 
    348347    arguments.getApplicationUsage()->addCommandLineOption("--window","Use a seperate Window for render to texture."); 
    349     arguments.getApplicationUsage()->addCommandLineOption("--width","Set the width of the render to texture"); 
    350     arguments.getApplicationUsage()->addCommandLineOption("--height","Set the height of the render to texture"); 
     348    arguments.getApplicationUsage()->addCommandLineOption("--width","Set the width of the render to texture."); 
     349    arguments.getApplicationUsage()->addCommandLineOption("--height","Set the height of the render to texture."); 
     350    arguments.getApplicationUsage()->addCommandLineOption("--image","Render to an image, then apply a post draw callback to it, and use this image to update a texture."); 
     351    arguments.getApplicationUsage()->addCommandLineOption("--texture-rectangle","Use osg::TextureRectangle for doing the render to texure to."); 
    351352    
    352353    // construct the viewer.