Show
Ignore:
Timestamp:
01/08/10 12:32:55 (4 years ago)
Author:
robert
Message:

From Rob Radtke, "I recently ran into some issues trying to save/load a scene graph as a .ive file. The problems came about because the scene graph contained depth textures in it. I have attached a patch (against the current revision: 10919) that fixes the issues that I encountered. Both attachments contain the same patch--one is a .zip file that contains the modified files and the other is a text patch file. Here is a summary of the changes I made:

1) Add getShadowComparison() accessor function to osg::Texture class
2) Modify ReaderWriterTiff::writeTifStream() and _readColor() (in Image.cpp) to handle pixelFormat==GL_DEPTH_COMPONENT as if it were GL_LUMINANCE
3) Modify the Texture classes of the ive and osg plug-ins so that they save/load the following Texture members: _use_shadow_comparison, _shadow_compare_func and _shadow_texture_mode
"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ive/Texture.cpp

    r10762 r10934  
    6363        out->writeInt(_sourceType); 
    6464    } 
     65 
     66    if( out->getVersion() >= VERSION_0043 ) 
     67    { 
     68      out->writeBool( _use_shadow_comparison ); 
     69      out->writeInt( _shadow_compare_func ); 
     70      out->writeInt( _shadow_texture_mode ); 
     71    } 
    6572} 
    6673 
     
    113120            _sourceType = in->readInt(); 
    114121        } 
     122 
     123        if( in->getVersion() >= VERSION_0043 ) 
     124        { 
     125          _use_shadow_comparison = in->readBool(); 
     126          _shadow_compare_func = (osg::Texture::ShadowCompareFunc)in->readInt(); 
     127          _shadow_texture_mode = (osg::Texture::ShadowTextureMode)in->readInt(); 
     128        } 
    115129    } 
    116130    else