I’ve been trying to make glLogicOp() work but doesn’t do anything (?)
First I enable the function with glEnable(GL_LOGIC_OP); I use shade model GL_FLAT, and I draw a triangle
glBegin(GL_TRIANGLES); glColor4f(0.0, 0.0, 1.0, 1.0);//blue glVertex3f(-0.4, 0.5, 0.0); glVertex3f(-0.4, -0.3, 0.0); glVertex3f(0.2, 0.1, 0.0); glEnd(); glLogicOp(GL_CLEAR); glFlush();
I am expecting to see a triangle with different color, but I still see the same blue triangle. I tried with two triangles with an intersecting region and enabled blending and nothing happened either. Is there another function that should be used or enabled in conjunction with glLogicOP?