Show
Ignore:
Timestamp:
11/23/09 12:00:07 (4 years ago)
Author:
robert
Message:

From Chris Hanson, " Add support for "OutputTextureFiles?" option to IVE plugin to permit creation of external
.dds texture files from internally-embedded textures during IVE writes."

From Robert Osfield, fixed a bug in the above submission, and changed the way that the filename of the file is passed into DataOutputStream? to avoid issues with the .ive's plugins ability to read from istreams.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ive/DataOutputStream.h

    r10762 r10819  
    131131    bool getUseOriginalExternalReferences() const {return _useOriginalExternalReferences;}; 
    132132 
     133    // Set and get if export texture files during write 
     134    void setOutputTextureFiles(bool flag) { _outputTextureFiles = flag; } 
     135    bool getOutputTextureFiles() const { return _outputTextureFiles; } 
     136 
     137    // support code for OutputTextureFiles 
     138    virtual std::string getTextureFileNameForOutput(); 
     139    void setFileName(std::string newFileName) {_filename = newFileName;} 
     140    std::string getFileName(void) const {return(_filename);} 
     141 
    133142    void setTerrainMaximumErrorToSizeRatio(double ratio) { _maximumErrorToSizeRatio = ratio; } 
    134143    double getTerrainMaximumErrorToSizeRatio() const { return _maximumErrorToSizeRatio; } 
     
    151160    std::ostream* _ostream; 
    152161    std::ostream* _output_ostream; 
     162    std::string _filename; // not necessary, but optional for use in texture export 
    153163     
    154164    std::stringstream _compressionStream; 
     
    189199 
    190200    IncludeImageMode    _includeImageMode; 
    191      
     201 
     202    bool _outputTextureFiles; 
     203    unsigned int _textureFileNameNumber; 
     204 
    192205    osg::ref_ptr<const osgDB::ReaderWriter::Options> _options; 
    193206