Refactored Callback system in osg::Node, osg::Drawable, osg::StateSet and osg::StateAttribute to use a new osg::Callback base class.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14244 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -84,6 +84,26 @@ bool osg::isTextureMode(StateAttribute::GLMode mode)
|
||||
return getTextureGLModeSet().isTextureMode(mode);
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// StateAttributeCallback
|
||||
//
|
||||
bool StateSet::Callback::run(osg::Object* object, osg::Object* data)
|
||||
{
|
||||
osg::StateSet* ss = dynamic_cast<osg::StateSet*>(object);
|
||||
osg::NodeVisitor* nv = dynamic_cast<osg::NodeVisitor*>(data);
|
||||
if (ss && nv)
|
||||
{
|
||||
operator()(ss, nv);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return traverse(object, data);
|
||||
}
|
||||
}
|
||||
|
||||
StateSet::StateSet():
|
||||
Object(true),
|
||||
_nestRenderBins(true)
|
||||
|
||||
Reference in New Issue
Block a user