Refactor osg::Geode to subclass from osg::Group and reuse the NodeList children container

This commit is contained in:
Robert Osfield
2014-06-03 09:23:24 +00:00
parent 2d41cbd0cf
commit 3dde165f14
10 changed files with 120 additions and 287 deletions

View File

@@ -256,12 +256,9 @@ void DebugShadowMap::ViewData::setDebugPolytope
pg._geometry[i]->setSupportsDisplayList( false );
}
if( _geode[i].valid() &&
!_geode[i]->containsDrawable( pg._geometry[i].get() ) ) {
osg::Geode::DrawableList & dl =
const_cast< osg::Geode::DrawableList &>
( _geode[i]->getDrawableList() );
dl.insert( dl.begin(), pg._geometry[i].get() );
if( _geode[i].valid() && !_geode[i]->containsDrawable( pg._geometry[i].get() ) )
{
_geode[i]->insertChild(0, pg._geometry[i].get() );
}
}
}