Refactored osgParticle so that it natives support vertex arrays, vertex buffer objects and vertex array objects

This commit is contained in:
Robert Osfield
2016-09-01 17:14:03 +01:00
parent cd3a5f8097
commit 5a4754deef
15 changed files with 532 additions and 336 deletions

View File

@@ -63,6 +63,15 @@ namespace osgParticle
return osg::maximum(_minimumNumberOfParticlesToCreate, i);
}
virtual int getEstimatedMaxNumOfParticles(double lifeTime) const
{
int minNumParticles = static_cast<int>(_minimumNumberOfParticlesToCreate*60.0f*lifeTime);
int baseNumPartciles = static_cast<int>(_numberOfParticlesPerSecondToCreate * lifeTime);
return osg::maximum(minNumParticles, baseNumPartciles);
}
protected:
virtual ~ConstantRateCounter() {}