Fix handling of in-scenegraph Drawables in MeshOptimizers
This commit is contained in:
@@ -38,13 +38,9 @@ void GeometryCollector::reset()
|
||||
_geometryList.clear();
|
||||
}
|
||||
|
||||
void GeometryCollector::apply(Geode& geode)
|
||||
void GeometryCollector::apply(Geometry& geom)
|
||||
{
|
||||
for(unsigned int i = 0; i < geode.getNumDrawables(); ++i )
|
||||
{
|
||||
osg::Geometry* geom = dynamic_cast<osg::Geometry*>(geode.getDrawable(i));
|
||||
if (geom) _geometryList.insert(geom);
|
||||
}
|
||||
_geometryList.insert(&geom);
|
||||
}
|
||||
|
||||
namespace
|
||||
@@ -890,14 +886,9 @@ void VertexCacheMissVisitor::reset()
|
||||
triangles = 0;
|
||||
}
|
||||
|
||||
void VertexCacheMissVisitor::apply(Geode& geode)
|
||||
void VertexCacheMissVisitor::apply(Geometry& geom)
|
||||
{
|
||||
for(unsigned int i = 0; i < geode.getNumDrawables(); ++i )
|
||||
{
|
||||
osg::Geometry* geom = dynamic_cast<osg::Geometry*>(geode.getDrawable(i));
|
||||
if (geom)
|
||||
doGeometry(*geom);
|
||||
}
|
||||
doGeometry(geom);
|
||||
}
|
||||
|
||||
namespace
|
||||
|
||||
Reference in New Issue
Block a user