|
|
|
@ -2,6 +2,8 @@
|
|
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
|
|
#include <osgDB/Registry>
|
|
|
|
|
|
|
|
|
|
#include "scenemanager.hpp"
|
|
|
|
|
#include "imagemanager.hpp"
|
|
|
|
|
#include "niffilemanager.hpp"
|
|
|
|
@ -68,6 +70,14 @@ namespace Resource
|
|
|
|
|
(*it)->updateCache(referenceTime);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ResourceSystem::clearCache()
|
|
|
|
|
{
|
|
|
|
|
for (std::vector<ResourceManager*>::iterator it = mResourceManagers.begin(); it != mResourceManagers.end(); ++it)
|
|
|
|
|
(*it)->clearCache();
|
|
|
|
|
|
|
|
|
|
osgDB::Registry::instance()->clearObjectCache();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ResourceSystem::addResourceManager(ResourceManager *resourceMgr)
|
|
|
|
|
{
|
|
|
|
|
mResourceManagers.push_back(resourceMgr);
|
|
|
|
|