Changeset 3291

Show
Ignore:
Timestamp:
08/16/04 23:14:19 (10 years ago)
Author:
robert
Message:

Added support for "flip" option string, which if present flips incoming
images about the vertical axis. Accessed via -O flip on the commandline.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/dds/ReaderWriterDDS.cpp

    r3088 r3291  
    728728    } 
    729729 
    730     virtual ReadResult readImage(std::istream& fin, const Options*) 
     730    virtual ReadResult readImage(std::istream& fin, const Options* options) 
    731731    { 
    732732        osg::Image* osgImage = ReadDDSFile(fin); 
    733733        if (osgImage==NULL) return ReadResult::FILE_NOT_HANDLED; 
     734         
     735        if (options && options->getOptionString().find("flip")!=std::string::npos) 
     736        { 
     737            osgImage->flipVertical(); 
     738        } 
     739         
    734740        return osgImage; 
    735741    }