Show
Ignore:
Timestamp:
01/21/09 19:23:55 (5 years ago)
Author:
robert
Message:

Replaced readImageFile() usage with readRefImageFile() to prevent threading issues with caching of imagery in the osgDB::Registry cache.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/PaletteRecords.cpp

    r9493 r9527  
    291291    osg::StateSet* readTexture(const std::string& filename, const Document& document) const 
    292292    { 
    293         osg::Image* image = osgDB::readImageFile(filename,document.getOptions()); 
     293        osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile(filename,document.getOptions()); 
    294294        if (!image) return NULL; 
    295295 
     
    301301        texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::REPEAT); 
    302302        texture->setResizeNonPowerOfTwoHint(true); 
    303         texture->setImage(image); 
     303        texture->setImage(image.get()); 
    304304        stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); 
    305305