Thanks Mathieu, changes merge with svn/trunk and OSG-2.8.
On Fri, Feb 20, 2009 at 3:40 PM, Mathieu MARACHE <[email protected]> wrote: > Hi Robert, > > I was trying to use the archive output of osgdem without success when > I eventually found out that it was now disabled (the mailing list > archive tells me it is because of multithreaded write issues with > vpn). I then decided to use osgarchive to make it myself from the > generated output. However if one of the insert parameters is a > directory, it won't be able to find them. The attached versions > corrects this. > > Index: osgarchive.cpp > =================================================================== > --- osgarchive.cpp (revision 9808) > +++ osgarchive.cpp (working copy) > @@ -79,7 +79,12 @@ > else if (fileType==osgDB::DIRECTORY) > { > osgDB::DirectoryContents directory = > osgDB::getDirectoryContents(arguments[pos]); > - > files.insert(files.end(),directory.begin(),directory.end()); > + osgDB::DirectoryContents::iterator it = > directory.begin(); > + while( it != directory.end()) > + { > + files.push_back(filePath + "/" + (*it)); > + ++it; > + } > } > } > else > > > now "osgarchive --archive hf.osga --insert hf.ive hf_root_L0_X0_Y0" > will work as (I) expected. > > However, when using the newly made osga archive, the PageLoader finds > only the first level of the generated PageLOD DB. > Let me detail a bit, is the file layout inside hf.osga (I sorted to > have the first levels) > > hf.ive > hf_root_L0_X0_Y0/hf_L0_X0_Y0_subtile.ive > hf_root_L0_X0_Y0/hf_L1_X0_Y0_subtile.ive > hf_root_L0_X0_Y0/hf_L2_X0_Y0_subtile.ive > hf_root_L0_X0_Y0/hf_L2_X0_Y1_subtile.ive > hf_root_L0_X0_Y0/hf_L2_X1_Y0_subtile.ive > hf_root_L0_X0_Y0/hf_L2_X1_Y1_subtile.ive > ... > > "osgviewer hf.osga" will load hf.ive from the archive, then > hf_root_L0_X0_Y0/hf_L0_X0_Y0_subtile.ive also from the archive, but > then will never find hf_root_L0_X0_Y0/hf_L1_X0_Y0_subtile.ive (with > DEBUG_INFO turned on it is clear that the DatabasePager doesn't look > into the archive anymore for files) > > Any idea of what's going wrong ? Maybe the attached hf.txt would help > (I snipped out the very verbose not related things ) > > regards, > > -- > Mathieu > O< ascii ribbon campaign - stop html mail - www.asciiribbon.org > > _______________________________________________ > 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
