[osg-users] Blend Equation and multipasses

2009-03-25 Thread paulo
Hi,

To use a mutipass I need to turn on blending. (at least with open gl)
Is it also needed with osgFX or is it automatic?

I tried adding a BlendEquation object to my stateset, but I could not figure 
out which symbolic constant corresponds to the gl functions

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

Anyone?

Thank you.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9231#9231





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Blend Equation and multipasses

2009-03-25 Thread Jason Daly

paulo wrote:

Hi,

To use a mutipass I need to turn on blending. (at least with open gl)
Is it also needed with osgFX or is it automatic?

I tried adding a BlendEquation object to my stateset, but I could not figure 
out which symbolic constant corresponds to the gl functions

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  



blendFunc = new osg::BlendFunc();
blendFunc-setFunction(osg::BlendFunc::SRC_ALPHA, 
osg::BlendFunc::ONE_MINUS_SRC_ALPHA);

stateSet-setMode(GL_BLEND, osg::StateAttribute::ON);
stateSet-setAttributeAndModes(blendFunc, osg::StateAttribute::ON);


--J
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org