|
|
@ -181,6 +181,7 @@ namespace Resource
|
|
|
|
, mAutoUseNormalMaps(false)
|
|
|
|
, mAutoUseNormalMaps(false)
|
|
|
|
, mAutoUseSpecularMaps(false)
|
|
|
|
, mAutoUseSpecularMaps(false)
|
|
|
|
, mInstanceCache(new MultiObjectCache)
|
|
|
|
, mInstanceCache(new MultiObjectCache)
|
|
|
|
|
|
|
|
, mSharedStateManager(new osgDB::SharedStateManager)
|
|
|
|
, mImageManager(imageManager)
|
|
|
|
, mImageManager(imageManager)
|
|
|
|
, mNifFileManager(nifFileManager)
|
|
|
|
, mNifFileManager(nifFileManager)
|
|
|
|
, mMinFilter(osg::Texture::LINEAR_MIPMAP_LINEAR)
|
|
|
|
, mMinFilter(osg::Texture::LINEAR_MIPMAP_LINEAR)
|
|
|
@ -392,7 +393,7 @@ namespace Resource
|
|
|
|
|
|
|
|
|
|
|
|
// share state
|
|
|
|
// share state
|
|
|
|
mSharedStateMutex.lock();
|
|
|
|
mSharedStateMutex.lock();
|
|
|
|
osgDB::Registry::instance()->getOrCreateSharedStateManager()->share(loaded.get());
|
|
|
|
mSharedStateManager->share(loaded.get());
|
|
|
|
mSharedStateMutex.unlock();
|
|
|
|
mSharedStateMutex.unlock();
|
|
|
|
|
|
|
|
|
|
|
|
if (mIncrementalCompileOperation)
|
|
|
|
if (mIncrementalCompileOperation)
|
|
|
@ -549,6 +550,10 @@ namespace Resource
|
|
|
|
|
|
|
|
|
|
|
|
void SceneManager::updateCache(double referenceTime)
|
|
|
|
void SceneManager::updateCache(double referenceTime)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
mSharedStateMutex.lock();
|
|
|
|
|
|
|
|
mSharedStateManager->prune();
|
|
|
|
|
|
|
|
mSharedStateMutex.unlock();
|
|
|
|
|
|
|
|
|
|
|
|
ResourceManager::updateCache(referenceTime);
|
|
|
|
ResourceManager::updateCache(referenceTime);
|
|
|
|
|
|
|
|
|
|
|
|
mInstanceCache->removeUnreferencedObjectsInCache();
|
|
|
|
mInstanceCache->removeUnreferencedObjectsInCache();
|
|
|
|