Cleaned up handling of Drawables so it utilizes the Node inheritance properly.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14822 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-04-07 15:49:06 +00:00
parent 814693ffc1
commit 6cff8650f2
4 changed files with 13 additions and 43 deletions

View File

@@ -162,19 +162,8 @@ osg::StateAttribute *SharedStateManager::find(osg::StateAttribute *sa)
//----------------------------------------------------------------
void SharedStateManager::setStateSet(osg::StateSet* ss, osg::Object* object)
{
osg::Drawable* drawable = dynamic_cast<osg::Drawable*>(object);
if (drawable)
{
drawable->setStateSet(ss);
}
else
{
osg::Node* node = dynamic_cast<osg::Node*>(object);
if (node)
{
node->setStateSet(ss);
}
}
osg::Node* node = dynamic_cast<osg::Node*>(object);
if (node) node->setStateSet(ss);
}