|
|
|
@ -387,6 +387,13 @@ MaterialColorController::MaterialColorController(const MaterialColorController &
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MaterialColorController::setDefaults(osg::StateSet *stateset)
|
|
|
|
|
{
|
|
|
|
|
// need to create a deep copy of StateAttributes we will modify
|
|
|
|
|
osg::Material* mat = static_cast<osg::Material*>(stateset->getAttribute(osg::StateAttribute::MATERIAL));
|
|
|
|
|
stateset->setAttribute(osg::clone(mat, osg::CopyOp::DEEP_COPY_ALL), osg::StateAttribute::ON);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MaterialColorController::apply(osg::StateSet *stateset, osg::NodeVisitor *nv)
|
|
|
|
|
{
|
|
|
|
|
if (hasInput())
|
|
|
|
|