Tweaks from using a ReadWriteMutex& to a ReadWriteMutex* parameter to avoid

problems with osgIntrospection generation.
This commit is contained in:
Robert Osfield
2006-12-27 23:19:17 +00:00
parent b2a0b50a5a
commit 11fef2d75e
4 changed files with 6 additions and 3 deletions

View File

@@ -114,9 +114,12 @@ void ConnectedParticleSystem::reuseParticle(int particleIndex)
void ConnectedParticleSystem::drawImplementation(osg::State& state) const
{
osgDB::ScopedReadLock lock(_readWriteMutex);
const Particle* particle = (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0;
if (!particle) return;
osg::Vec4 pixelSizeVector = osg::CullingSet::computePixelSizeVector(*state.getCurrentViewport(),state.getProjectionMatrix(),state.getModelViewMatrix());
float unitPixelSize = fabs(1.0/(particle->getPosition()*pixelSizeVector));
float pixelSizeOfFirstParticle = unitPixelSize * particle->getCurrentSize();