From: Sylvain Faisan (sylvain.faisan++at++imag.fr)
Date: 04/20/2001 04:17:43
Hi
I'd like to use special blendings for a pfDCS object : "a square with a
texture".
I'm writting so this part of code :
//for the initialization
imageDCS->setTravFuncs(PFTRAV_DRAW, preDraw, postDraw);
int preDraw(pfTraverser*, void*)
{
//The pre- and post- methodology supports save and restore or push and
pop //programming constructs.
glPushAttrib(GL_BLEND);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
return PFTRAV_CONT;
}
int postDraw(pfTraverser*, void*)
{
//restore the context
glPopAttrib();
return PFTRAV_CONT;
}
////////////////////////////////////////////////////////////////////
It's working when A=0 or A=255. Else all appears red but nothing is red
in the scene! If I change the arguments that I give to the "glBlendFunc"
function, it changes the saturation of the color red!!
Have someone any idea?
Thank you by advance,
Sylvain
This archive was generated by hypermail 2b29 : Fri Apr 20 2001 - 04:17:53 PDT