Changed the image reading so that it leverages the osgDB::Input::readImage() method

to ensure that it picks up on any local paths set on the Input object.
This commit is contained in:
Robert Osfield 2008-09-10 11:28:47 +00:00
parent c266cef6b1
commit f738ab8fe2

View File

@ -38,7 +38,7 @@ bool ImageLayer_readLocalData(osg::Object& obj, osgDB::Input &fr)
osgTerrain::extractSetNameAndFileName(fr[1].getStr(),setname, filename);
if (!filename.empty())
{
osg::ref_ptr<osg::Image> image = osgDB::readImageFile(filename);
osg::ref_ptr<osg::Image> image = fr.readImage(filename.c_str());
if (image.valid())
{
layer.setName(setname);