[osg-users] Blend Equation and multipasses

Jason Daly jdaly at ist.ucf.edu
Wed Mar 25 11:03:05 PDT 2009


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"



More information about the osg-users mailing list