Added the ability for osgParticle::ParticleEffect to switch off the automatic setup.
Normally the automatic setup is useful, but in the case of the .osg support this automatic update was forcing premature loading of imagery that wasn't necessarily, and can lead to reports of looking for files that arn't present.
This commit is contained in:
@@ -24,7 +24,8 @@ namespace osgParticle
|
||||
{
|
||||
public:
|
||||
|
||||
ParticleEffect():
|
||||
ParticleEffect(bool automaticSetup=true):
|
||||
_automaticSetup(automaticSetup),
|
||||
_useLocalParticleSystem(true),
|
||||
_scale(1.0f),
|
||||
_intensity(1.0f),
|
||||
@@ -41,6 +42,9 @@ namespace osgParticle
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const ParticleEffect*>(obj) != 0; }
|
||||
virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } }
|
||||
|
||||
void setAutomaticSetup(bool flag) { _automaticSetup = flag; }
|
||||
bool getAutomaticSetup() const { return _automaticSetup; }
|
||||
|
||||
void setUseLocalParticleSystem(bool local);
|
||||
bool getUseLocalParticleSystem() const { return _useLocalParticleSystem; }
|
||||
|
||||
@@ -93,6 +97,8 @@ namespace osgParticle
|
||||
protected:
|
||||
|
||||
virtual ~ParticleEffect() {}
|
||||
|
||||
bool _automaticSetup;
|
||||
|
||||
osg::ref_ptr<ParticleSystem> _particleSystem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user