|
楼主 |
发表于 2011-5-12 11:17:42
|
显示全部楼层
代码中用了:
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet();
stateset->setAttributeAndModes(new osg::BlendFunc(osg::BlendFunc::ONE,osg::BlendFunc::SRC_ALPHA));
stateset->setMode(GL_BLEND,osg::StateAttribute::ON);
stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
第二张透明的图片,我设置了
osg::TexEnv* texenv = new osg::TexEnv;
texenv->setMode(osg::TexEnv::MODULATE);
texenv->setColor(osg::Vec4(0.0f,0.0f,0.0f,0.5f)); |
|