PDA

View Full Version : XOR logical operation not working on Intel HD4000



sam_hawker
12-12-2016, 03:51 AM
I'm trying to use the XOR logical operation (with GL_RGBA32UI multiple render targets) on an Intel HD4000 using the following code:

glLogicOp(GL_XOR);
glEnable(GL_COLOR_LOGIC_OP);

However it seems to be ignoring this command and continuing to use a copy (or blend?) operation. The exact same program running on an NVIDIA video card works correctly. Is this an optional feature? If so, is there some way to check for support? Alternatively is it a known bug or does someone have an example that is confirmed to work on this hardware?

GClements
12-12-2016, 07:41 AM
Is this an optional feature?

No. Logic operations are ignored if the destination framebuffer is floating-point or sRGB-encoded, but are supposed to work in any other case.

glEnable(GL_COLOR_LOGIC_OP) automatically disables blending (even in contexts where logic operations are ignored), but blending doesn't work with an integer framebuffer in any case.