Reset: hook to clear the effects cache.
This commit is contained in:
@@ -176,6 +176,8 @@ Effect* makeEffect(SGPropertyNode* prop,
|
|||||||
bool makeParametersFromStateSet(SGPropertyNode* paramRoot,
|
bool makeParametersFromStateSet(SGPropertyNode* paramRoot,
|
||||||
const osg::StateSet* ss);
|
const osg::StateSet* ss);
|
||||||
|
|
||||||
|
void clearEffectCache();
|
||||||
|
|
||||||
namespace effect
|
namespace effect
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -270,4 +270,10 @@ Effect* makeEffect(SGPropertyNode* prop,
|
|||||||
return effect.release();
|
return effect.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearEffectCache()
|
||||||
|
{
|
||||||
|
OpenThreads::ScopedLock<OpenThreads::ReentrantMutex> lock(effectMutex);
|
||||||
|
effectMap.clear();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user