Hi Terry, I have just had a look at your submission. There are quite a few other changes to Registry.cpp since January so it's a bit awkward to spot just what you changed. I believe it's just the part with the getSimpleFileName() and associated ReadFunctor code. My first thought is that this approach is a bit cryptic. I'm wondering if the Registry::findDataFileImplementation() might be able to adapted, not sure how yet, wondering if there might be scope for querying the ReaderWriter's or the Options::FilePathList for presence of the .zip.
I've got some other submissions to review so I'll have a look at these and come back to this issue. Robert. On 20 January 2013 00:54, Terry Welsh <[email protected]> wrote: > The attached sample missile.zip cannot be loaded properly. > > osgviewer missile.zip/missile.osg > > will load an untextured model. This is because the texture is > specified as "C:\\blah\\blah\\blah\\missile.png" instead of simply > "missile.png". > > The attached Registry.cpp fixes this so that referenced data files > will be found even with incorrect paths, much like they can be found > in regular directories using OSG_FILE_PATH. This adds flexibility to > storing data in archives. > > I don't know if I have the best solution here because the line > > std::auto_ptr<ReadFunctor> > simple_readFunctor(readFunctor.cloneType(getSimpleFileName(readFunctor._filename), > readFunctor._options)); > > can cause a lot of extra new and delete operations. What do you think? > -- > Terry Welsh > www.reallyslick.com > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
