My program has been working fine with OSG 2.x.
First it passes a .osga (archive file containing a large 3D model).

const string pathname = .... "GoldenGate.osga";
return osgDB::readNodeFile( pathname );

Then later it loads texture files using osgDB::readImageFile().

But OSG 3.x broke the ability, in my program, to load texture directly
from files
(files on the file-system, not inside the .osga archive).

The .osga archive incorrectly sticks in osgDB's state,
which breaks osgDB::readImageFile() for regular file loading.
....
OSGA_Archive::readObject(obj, data/textures/cloud0.png) failed, file
not found in archive
....

A kludge was to disable caching then everything just worked:

RefPtr<osgDB::ReaderWriter::Options> options = new
osgDB::ReaderWriter::Options();
options->setObjectCacheHint( osgDB::ReaderWriter::Options::CACHE_NONE );

return osgDB::readNodeFile( pathname, options );

--
Jim Brooks
jimblist -at- gmail -dot- com
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to