Added Options support to ImageSequence LOAD_* functionality
This commit is contained in:
@@ -313,7 +313,7 @@ void ImageSequence::update(osg::NodeVisitor* nv)
|
||||
{
|
||||
if (!(itr->_image) && !(itr->_filename.empty()))
|
||||
{
|
||||
itr->_image = irh->readImageFile(itr->_filename);
|
||||
itr->_image = irh->readImageFile(itr->_filename, _readOptions.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -368,7 +368,7 @@ void ImageSequence::update(osg::NodeVisitor* nv)
|
||||
if (loadDirectly)
|
||||
{
|
||||
OSG_NOTICE<<"Reading file, entry="<<i<<" : _fileNames[i]="<<_imageDataList[i]._filename<<std::endl;
|
||||
osg::ref_ptr<osg::Image> image = irh->readImageFile(_imageDataList[i]._filename); // TODO, need _readOptions object.
|
||||
osg::ref_ptr<osg::Image> image = irh->readImageFile(_imageDataList[i]._filename, _readOptions.get());
|
||||
if (image.valid())
|
||||
{
|
||||
OSG_NOTICE<<" Assigning image "<<_imageDataList[i]._filename<<std::endl;
|
||||
|
||||
@@ -323,9 +323,10 @@ int ImagePager::cancel()
|
||||
return result;
|
||||
}
|
||||
|
||||
osg::Image* ImagePager::readImageFile(const std::string& fileName)
|
||||
osg::Image* ImagePager::readImageFile(const std::string& fileName, const osg::Referenced* options)
|
||||
{
|
||||
return osgDB::readImageFile(fileName);
|
||||
osgDB::Options* readOptions = dynamic_cast<osgDB::Options*>(const_cast<osg::Referenced*>(options));
|
||||
return osgDB::readImageFile(fileName, readOptions);
|
||||
}
|
||||
|
||||
void ImagePager::requestImageFile(const std::string& fileName, osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* framestamp, osg::ref_ptr<osg::Referenced>& imageRequest, const osg::Referenced* options)
|
||||
|
||||
Reference in New Issue
Block a user