Added an osgDB::ReadWriteMutex to help manage the ability to have serialize

write to objects but allow multiple threads to read at once in a read only way.
This commit is contained in:
Robert Osfield
2006-12-27 16:40:34 +00:00
parent cd133e5f2c
commit 30cb8735d3
8 changed files with 140 additions and 18 deletions

View File

@@ -91,6 +91,8 @@ void osgParticle::ParticleSystem::update(double dt)
void osgParticle::ParticleSystem::drawImplementation(osg::State& state) const
{
osgDB::ScopedReadLock lock(_readWriteMutex);
// update the frame count, so other objects can detect when
// this particle system is culled
_last_frame = state.getFrameStamp()->getFrameNumber();