|
|
@ -6,7 +6,6 @@
|
|
|
|
#include <osg/UserDataContainer>
|
|
|
|
#include <osg/UserDataContainer>
|
|
|
|
|
|
|
|
|
|
|
|
#include <osgParticle/ParticleSystem>
|
|
|
|
#include <osgParticle/ParticleSystem>
|
|
|
|
#include <osgFX/Effect>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <osgUtil/IncrementalCompileOperation>
|
|
|
|
#include <osgUtil/IncrementalCompileOperation>
|
|
|
|
|
|
|
|
|
|
|
@ -139,9 +138,6 @@ namespace Resource
|
|
|
|
|
|
|
|
|
|
|
|
virtual void apply(osg::Node& node)
|
|
|
|
virtual void apply(osg::Node& node)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (osgFX::Effect* effect = dynamic_cast<osgFX::Effect*>(&node))
|
|
|
|
|
|
|
|
applyEffect(*effect);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
osg::StateSet* stateset = node.getStateSet();
|
|
|
|
osg::StateSet* stateset = node.getStateSet();
|
|
|
|
if (stateset)
|
|
|
|
if (stateset)
|
|
|
|
applyStateSet(stateset);
|
|
|
|
applyStateSet(stateset);
|
|
|
@ -149,19 +145,6 @@ namespace Resource
|
|
|
|
traverse(node);
|
|
|
|
traverse(node);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void applyEffect(osgFX::Effect& effect)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (int i =0; i<effect.getNumTechniques(); ++i)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
osgFX::Technique* tech = effect.getTechnique(i);
|
|
|
|
|
|
|
|
for (int pass=0; pass<tech->getNumPasses(); ++pass)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (tech->getPassStateSet(pass))
|
|
|
|
|
|
|
|
applyStateSet(tech->getPassStateSet(pass));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void apply(osg::Geode& geode)
|
|
|
|
virtual void apply(osg::Geode& geode)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
osg::StateSet* stateset = geode.getStateSet();
|
|
|
|
osg::StateSet* stateset = geode.getStateSet();
|
|
|
|