Hi everyone:
 How to achieve blend funtion in osg. I means  by alpha(0.0~1.0)  value to set 
my geometry color, 
I use follows code
 
 geometry->getOrCreateStateSet()->setMode(GL_BLEND, osg::StateAttribute::ON);
 osg::BlendFunc *fn = new osg::BlendFunc();
  fn->setFunction(osg::BlendFunc::SRC_ALPHA,osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
   
    geometry->getOrCreateStateSet()->setAttributeAndModes(fn, 
osg::StateAttribute::ON);

Best regards
YangXiao


      ___________________________________________________________ 
 雅虎邮箱,您的终生邮箱! 
http://cn.mail.yahoo.com/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to