It's fixed! 

Code:
        osg::ref_ptr<osg::BlendFunc> blendFunc = new 
osg::BlendFunc(osg::BlendFunc::SRC_ALPHA, osg::BlendFunc::DST_ALPHA, 
osg::BlendFunc::ZERO, osg::BlendFunc::ONE);
        label->getOrCreateStateSet()->setAttributeAndModes(blendFunc);



I didn't know you could/should specify the alpha blending separately.

Now it doesn't overwrite the alpha anymore. It also means I HAVE to draw a 
background for the label first, or else it will not be visible... but that's a 
minor inconvenience, I don't think my idea "only write alpha when it's higher 
than destination alpha" is actually possible in openGL. Somehow I assume that 
it worked that way because it seems intuitive in the situation I am working 
with..

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to