|
- //设置材质
- osg::Material* front = new osg::Material;
- front->setColorMode(osg::Material::AMBIENT);
- front->setAlpha(osg::Material::FRONT_AND_BACK,0.5);
- front->setAmbient(osg::Material::FRONT_AND_BACK,osg::Vec4(1.0f,1.0f,0.0f,0.5f));
- front->setDiffuse(osg::Material::FRONT_AND_BACK,osg::Vec4(1.0f,1.0f,0.0f,0.5f));
- root->getOrCreateStateSet()->setAttributeAndModes(front);
复制代码 请问如上设置材质透明度之后为什么没有显示透明效果?应如何改进一下?
|
|