PDA

View Full Version : Invert Destination Color



BBrown
06-04-2003, 04:22 AM
What is the best way to invert the destination pixel color when drawing. Is this possible?

knackered
06-04-2003, 04:33 AM
Off hand,
glEnable(GL_BLEND);
glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO);

Relic
06-04-2003, 05:07 AM
Or
glLogicOp(GL_INVERT);
glEnable(GL_COLOR_LOGIC_OP);

BBrown
06-04-2003, 05:22 AM
Thanks for the quick responses. I could have sworn I did the blend like that yesterday, but seems to work great now. The logical op works great too. Any idea if there is much of a speed difference?

harsman
06-04-2003, 08:51 AM
LogicOp is probably much slower on most hardware.