Fix handling of in-scenegraph drawables in osgUtil::Simplifier
This commit is contained in:
parent
2a7d72c203
commit
a13b66135f
@ -97,16 +97,9 @@ class OSGUTIL_EXPORT Simplifier : public osg::NodeVisitor
|
|||||||
return getSampleRatio()<1.0;
|
return getSampleRatio()<1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void apply(osg::Geode& geode)
|
virtual void apply(osg::Geometry& geom)
|
||||||
{
|
{
|
||||||
for(unsigned int i=0;i<geode.getNumDrawables();++i)
|
simplify(geom);
|
||||||
{
|
|
||||||
osg::Geometry* geometry = geode.getDrawable(i)->asGeometry();
|
|
||||||
if (geometry)
|
|
||||||
{
|
|
||||||
simplify(*geometry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** simply the geometry.*/
|
/** simply the geometry.*/
|
||||||
|
Loading…
Reference in New Issue
Block a user