HI Gustav, To avoid the possibility of copy and paste mistakes could you make the changes and send me the whole modified files.
Thanks, Robert. On Tue, Jun 9, 2009 at 9:00 AM, Gustav Haapalahti<[email protected]> wrote: > Hi, > > I checked out the modifications you made and it seems like one of the changes > you have done is not correct. In ive plugin ProxyNode.cpp you do the > following: > if (!out->getExternalFileWritten(getFileName(i))) > { > osgDB::writeNodeFile(*getChild(i), ivename); > out->setExternalFileWritten(ivename, true); > } > > but it should be like this, with the same filename in both the set and get > methods, otherwise it will not work. > > if (!out->getExternalFileWritten(ivename)) > { > osgDB::writeNodeFile(*getChild(i), ivename); > out->setExternalFileWritten(ivename, true); > } > > In the osg plugin ProxyNode.cpp the following could also be cleaned up a > little and made clearer by using the "origname" variable in the last > "setExternalFileWritten" statement as well. > std::string origname = proxyNode.getFileName(i); > if (!fw.getExternalFileWritten(origname)) > { > osgDB::writeNodeFile(*proxyNode.getChild(i), origname); > fw.setExternalFileWritten(proxyNode.getFileName(i), > true); > } > > Best Regards Gustav > > Robert Osfield skrev: >> Hi Gustav, >> >> Thanks for your changes, I'm merged and ammended these and have now >> checked in the results into svn/trunk. The changes I made were: >> >> changed command line parameter to --enable-object-cache >> >> changed set/get methods in osgDB::Output and >> ive/DataOutputStream.cpp to be s/getExternalFileWritten(const >> std::string&) >> >> cleaned up set up of osgDB::Options. >> >> >> Note that I change the string parameters to const string& as passing >> strings around can be very expensive as most std::string >> implementations share the data pointer, and this in turn means it'll >> be using a mutex lock on that data when copying it so passing a const >> reference is far more preferable. >> >> Could you please test these changes out, >> >> Thanks, >> Robert. >> >> On Mon, Jun 8, 2009 at 11:41 AM, Gustav Haapalahti<[email protected]> wrote: >>> Hi, >>> >>> This is a continuation to my previous submission. >>> I noticed that the same problem that I fixed in ProxyNode.cpp for the osg >>> plugin (external files being written over and over again) also existed in >>> the ive plugin. I attached a submission where the ive plugin remembers >>> which external files that have already been written and do not write them >>> again. >>> >>> Thank you! >>> >>> Cheers, >>> Gustav >>> >>> ------------------ >>> Read this topic online here: >>> http://forum.openscenegraph.org/viewtopic.php?p=13684#13684 >>> >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- > > Gustav Haapalahti > KE Informatik (Informatics) > Avdelningen för Informationssystem (Division of Information Systems) > FOI (Swedish Defence Research Agency) > Web: http://www.foi.se > > _______________________________________________ > 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
