3D模型选中显示样式改变

时间:2023-11-15 15:42:20
osg::ref_ptr<osg::Material> material = new osg::Material();            //模型材质信息
material->setTransparency(osg::Material::FRONT_AND_BACK, 1.0);
material->setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4(1.0,0.0,0.0,1.0)); //设置发光
geode2->getOrCreateStateSet()->setAttributeAndModes(material,osg::StateAttribute::ON);
问题:
不是所有模型都适用
改变之后无法还原