|
发表于 2009-11-11 10:43:43
|
显示全部楼层
本帖最后由 qele 于 2009-11-11 10:45 编辑
- osg::StateSet* stateset = new osg::StateSet;
-
- osg::BlendEquation* blendEquation = new osg::BlendEquatio(osg::BlendEquation::FUNC_ADD);
- stateset->setAttributeAndModes(blendEquation,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
-
- //tell to sort the mesh before displaying it
- stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
- stateset->setMode( GL_BLEND, osg::StateAttribute::ON );
- cone->setStateSet(stateset);
复制代码 |
|