osg::ref_ptr<osg::Material> material = new osg::Material;
osg::Vec4 redColor(1.0, 0.0, 0.0, 1.0);
material->setAmbient(osg::Material::FRONT_AND_BACK, redColor);
material->setDiffuse(osg::Material::FRONT_AND_BACK,redColor);
material->setColorMode(osg::Material::AMBIENT);
cow->getOrCreateStateSet()->setAttributeAndModes(material.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE);
C++学习(三零四)osg材质Material使用
最新推荐文章于 2024-04-25 16:30:05 发布