Reset: hook to clear the effects cache.

This commit is contained in:
James Turner
2013-12-04 09:12:51 +00:00
parent 053e761d8f
commit 26d9256ee9
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -176,6 +176,8 @@ Effect* makeEffect(SGPropertyNode* prop,
bool makeParametersFromStateSet(SGPropertyNode* paramRoot,
const osg::StateSet* ss);
void clearEffectCache();
namespace effect
{
/**
+6
View File
@@ -270,4 +270,10 @@ Effect* makeEffect(SGPropertyNode* prop,
return effect.release();
}
void clearEffectCache()
{
OpenThreads::ScopedLock<OpenThreads::ReentrantMutex> lock(effectMutex);
effectMap.clear();
}
}