Merge pull request #646 from flashk/patch-7
Use options when loading images in Collada loader
This commit is contained in:
commit
c4100174a8
@ -143,6 +143,9 @@ ReaderWriterDAE::readNode(const std::string& fname,
|
||||
|
||||
std::string fileName( osgDB::findDataFile( fname, options ) );
|
||||
if( fileName.empty() ) return ReadResult::FILE_NOT_FOUND;
|
||||
|
||||
pluginOptions.options = options ? osg::clone(options, osg::CopyOp::SHALLOW_COPY) : new Options;
|
||||
pluginOptions.options->getDatabasePathList().push_front(osgDB::getFilePath(fileName));
|
||||
|
||||
OSG_INFO << "ReaderWriterDAE( \"" << fileName << "\" )" << std::endl;
|
||||
|
||||
|
@ -1136,7 +1136,7 @@ osg::Texture2D* daeReader::processTexture(
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::ref_ptr<osg::Image> img = osgDB::readRefImageFile(parameters.filename);
|
||||
osg::ref_ptr<osg::Image> img = osgDB::readRefImageFile(parameters.filename, _pluginOptions.options.get());
|
||||
|
||||
if (!img.valid())
|
||||
{
|
||||
|
@ -157,6 +157,7 @@ public:
|
||||
int precisionHint; ///< Precision hint flags, as specified in osgDB::Options::PrecisionHint
|
||||
bool usePredefinedTextureUnits;
|
||||
TessellateMode tessellateMode;
|
||||
osg::ref_ptr<osgDB::ReaderWriter::Options> options;
|
||||
};
|
||||
|
||||
daeReader(DAE *dae_, const Options * pluginOptions);
|
||||
|
Loading…
Reference in New Issue
Block a user