OutputStream writes images using its Options object

when writing images, OutputStream can search files using its Options object rahter than always using FilePathList object of global Regidtry instance.
This commit is contained in:
Haojia Yu 2018-03-27 18:56:38 +08:00 committed by Robert Osfield
parent fb39450067
commit 0d386ff3f1

View File

@ -580,7 +580,7 @@ void OutputStream::writeImage( const osg::Image* img )
case IMAGE_INLINE_FILE:
if ( isBinary() )
{
std::string fullPath = osgDB::findDataFile( img->getFileName() );
std::string fullPath = osgDB::findDataFile( img->getFileName(), _options );
osgDB::ifstream infile( fullPath.c_str(), std::ios::in|std::ios::binary );
if ( infile )
{