XOR in RGB

Is there a way to have an XOR blend mode in a RGB buffer?. I’ve been taking a look at the glBlendFunc options and I do not see how to do it.

Thanks,

Sal

Use the logical operations.

Grab the red book and read the framebuffer section. You can find it online.

I saw that in the specs posted in the opengl.org web site the glLogicOps can be applied to both color RGB values and indexes. However, in the Microsoft SDK documentation for OpenGL says: “The glLogicOp function specifies a logical pixel operation for color index rendering.” (my emphasis), and it insists throughout the text about the same idea. Somebody is wrong (I hope it is Microsoft :wink:

Salvador

Originally posted by Gorg:
[b]Use the logical operations.

Grab the red book and read the framebuffer section. You can find it online. [/b]

I guess, this part of the Microsoft OpenGL SDK still represent OpenGL 1.0
Support for the logical pixel operations in RGBA mode was introduced in OpenGL 1.1

add the two lines to your programs, and see the results

call glEnable(GL_COLOR_LOGIC_OP)
CALL glLogicOp(GL_XOR)

Originally posted by sbayarri:
[b]Is there a way to have an XOR blend mode in a RGB buffer?. I’ve been taking a look at the glBlendFunc options and I do not see how to do it.

Thanks,

Sal

[/b]