Skip to content

Commit

Permalink
Set material on both front and back faces (#10357)
Browse files Browse the repository at this point in the history
  • Loading branch information
anotheruserofgithub committed Mar 21, 2023
1 parent 84ce64a commit 16cbb66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMEdit/OMEditLIB/Animation/Visualization.cpp
Expand Up @@ -1634,7 +1634,7 @@ void UpdateVisitor::changeColor(osg::StateSet* ss, const QColor color)
{
osg::ref_ptr<osg::Material> material = dynamic_cast<osg::Material*>(ss->getAttribute(osg::StateAttribute::MATERIAL));
if (!material.valid()) material = new osg::Material();
material->setDiffuse(osg::Material::FRONT, osg::Vec4f(color.redF(), color.greenF(), color.blueF(), color.alphaF()));
material->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(color.redF(), color.greenF(), color.blueF(), color.alphaF()));
ss->setAttribute(material.get());
}
}
Expand Down

0 comments on commit 16cbb66

Please sign in to comment.