Added mutexes to ParticleProcessor and ParticleSystemUpdater to improve the thread safety of osgParticle

This commit is contained in:
Robert Osfield
2006-12-22 21:52:53 +00:00
parent bd6b7d581e
commit 401f3bcd43
4 changed files with 21 additions and 11 deletions

View File

@@ -62,9 +62,10 @@ void osgParticle::ParticleProcessor::traverse(osg::NodeVisitor& nv)
// continue only if the particle system is valid
if (_ps.valid())
{
if (nv.getFrameStamp())
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_cullUpdatelMutex);
//added- 1/17/06- bgandere@nps.edu
//a check to make sure we havent updated yet this frame
if(_frameNumber < nv.getFrameStamp()->getFrameNumber())