From 90e95ff63dd5f4b63c2d9fed2c94acd990c6f765 Mon Sep 17 00:00:00 2001 From: Haojia Yu Date: Tue, 27 Mar 2018 18:56:38 +0800 Subject: [PATCH] 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. --- src/osgDB/OutputStream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgDB/OutputStream.cpp b/src/osgDB/OutputStream.cpp index 073e852a2..be625826c 100644 --- a/src/osgDB/OutputStream.cpp +++ b/src/osgDB/OutputStream.cpp @@ -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 ) {