Merged from OSG-2.8 branch changes to the use of ReadWriteMutex to Mutex in osgParticle::ParticleSystem.
svn command: svn merge -r 9725:9726 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.8
This commit is contained in:
@@ -116,7 +116,7 @@ void ConnectedParticleSystem::drawImplementation(osg::RenderInfo& renderInfo) co
|
||||
{
|
||||
osg::State& state = *renderInfo.getState();
|
||||
|
||||
OpenThreads::ScopedReadLock lock(_readWriteMutex);
|
||||
ScopedReadLock lock(_readWriteMutex);
|
||||
|
||||
const Particle* particle = (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0;
|
||||
if (!particle) return;
|
||||
|
||||
@@ -64,7 +64,7 @@ void osgParticle::ParticleProcessor::traverse(osg::NodeVisitor& nv)
|
||||
{
|
||||
if (nv.getFrameStamp())
|
||||
{
|
||||
OpenThreads::ScopedWriteLock lock(*(_ps->getReadWriteMutex()));
|
||||
ParticleSystem::ScopedWriteLock lock(*(_ps->getReadWriteMutex()));
|
||||
|
||||
//added- 1/17/06- bgandere@nps.edu
|
||||
//a check to make sure we havent updated yet this frame
|
||||
|
||||
@@ -96,7 +96,7 @@ void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo
|
||||
{
|
||||
osg::State& state = *renderInfo.getState();
|
||||
|
||||
OpenThreads::ScopedReadLock lock(_readWriteMutex);
|
||||
ScopedReadLock lock(_readWriteMutex);
|
||||
|
||||
// update the frame count, so other objects can detect when
|
||||
// this particle system is culled
|
||||
|
||||
@@ -40,7 +40,7 @@ void osgParticle::ParticleSystemUpdater::traverse(osg::NodeVisitor& nv)
|
||||
{
|
||||
ParticleSystem* ps = i->get();
|
||||
|
||||
OpenThreads::ScopedWriteLock lock(*(ps->getReadWriteMutex()));
|
||||
ParticleSystem::ScopedWriteLock lock(*(ps->getReadWriteMutex()));
|
||||
|
||||
if (!ps->isFrozen() && (ps->getLastFrameNumber() >= (nv.getFrameStamp()->getFrameNumber() - 1) || !ps->getFreezeOnCull()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user