From b5099324d19e79359a05bff7dacddc17f12f6dc4 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 10 Jun 2015 20:35:59 +0200 Subject: [PATCH] Enable ParticleSystem's FreezeOnCull, big speed-up in Vivec --- components/nifosg/nifloader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index fcba9893d..2c409ac96 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -822,6 +822,8 @@ namespace NifOsg partsys->getDefaultParticleTemplate().setColorRange(osgParticle::rangev4(osg::Vec4f(1.f,1.f,1.f,1.f), osg::Vec4f(1.f,1.f,1.f,1.f))); partsys->getDefaultParticleTemplate().setAlphaRange(osgParticle::rangef(1.f, 1.f)); + partsys->setFreezeOnCull(true); + osg::ref_ptr emitter = handleParticleEmitter(partctrl); emitter->setParticleSystem(partsys); emitter->setReferenceFrame(osgParticle::ParticleProcessor::RELATIVE_RF);