TextureVisitor: remove redundant code for Geode handling

This commit is contained in:
scrawl 2017-01-20 21:08:02 +01:00
parent 4457df9a8a
commit dc2689f779
2 changed files with 0 additions and 28 deletions

View File

@ -626,7 +626,6 @@ class OSGUTIL_EXPORT Optimizer
_changeClientImageStorage(changeClientImageStorage), _valueClientImageStorage(valueClientImageStorage), _changeClientImageStorage(changeClientImageStorage), _valueClientImageStorage(valueClientImageStorage),
_changeAnisotropy(changeAnisotropy), _valueAnisotropy(valueAnisotropy) {} _changeAnisotropy(changeAnisotropy), _valueAnisotropy(valueAnisotropy) {}
virtual void apply(osg::Geode& node);
virtual void apply(osg::Node& node); virtual void apply(osg::Node& node);
void apply(osg::StateSet& stateset); void apply(osg::StateSet& stateset);

View File

@ -2968,33 +2968,6 @@ void Optimizer::TextureVisitor::apply(osg::Node& node)
traverse(node); traverse(node);
} }
void Optimizer::TextureVisitor::apply(osg::Geode& geode)
{
if (!isOperationPermissibleForObject(&geode)) return;
osg::StateSet* ss = geode.getStateSet();
if (ss && isOperationPermissibleForObject(ss))
{
apply(*ss);
}
for(unsigned int i=0;i<geode.getNumDrawables();++i)
{
osg::Drawable* drawable = geode.getDrawable(i);
if (drawable)
{
ss = drawable->getStateSet();
if (ss &&
isOperationPermissibleForObject(drawable) &&
isOperationPermissibleForObject(ss))
{
apply(*ss);
}
}
}
}
void Optimizer::TextureVisitor::apply(osg::StateSet& stateset) void Optimizer::TextureVisitor::apply(osg::StateSet& stateset)
{ {
for(unsigned int i=0;i<stateset.getTextureAttributeList().size();++i) for(unsigned int i=0;i<stateset.getTextureAttributeList().size();++i)