Implemented updating of revision files as new data is writing to the FileCache

This commit is contained in:
Robert Osfield
2009-06-04 14:07:12 +00:00
parent cf976e956d
commit 40155d59b4
7 changed files with 1690 additions and 53 deletions

View File

@@ -66,19 +66,6 @@ int main(int argc, char** argv)
}
#endif
std::string url, username, password;
while(arguments.read("--login",url, username, password))
{
if (!osgDB::Registry::instance()->getAuthenticationMap())
{
osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap);
osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails(
url,
new osgDB::AuthenticationDetails(username, password)
);
}
}
// set up the camera manipulators.
{
osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;
@@ -135,10 +122,12 @@ int main(int argc, char** argv)
osgDB::FileCache* fileCache = osgDB::Registry::instance()->getFileCache();
if (fileCache)
{
osg::notify(osg::NOTICE)<<"We have FileCache "<<fileCache<<std::endl;
fileCache->loadDatabaseRevisionsForFile(file);
// fileCache->loadDatabaseRevisionsForFile(file); // test to make sure that repeated loads of same revision file doesn't cause problems
}
// load the data
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(file);
if (!loadedModel)