blending problem with a texture

New Message Reply Date view Thread view Subject view Author view

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


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Apr 20 2001 - 04:17:53 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.