I successfully painted two smooth shapes in OpenGL, using a procedure that generates a triangular strip, in which the extreme line of the edge has all its vertices in alpha 0 . Now I want to cross them, but I always seem to lose the smooth edges of one shape. Here is the code I'm using:
// Draw: smooth black shape as normal glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); // Draw: smooth black shape into alpha channel glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); glBlendFunc(GL_DST_ALPHA, GL_SRC_ALPHA); // Draw: Yellow overlay shape with black shape alpha // Reset blending modes for rest of program

And here is the result (bottom) - the yellow figure loses its smooth right edge, because the alpha in these pixels is now equal to 1. How can I get a smooth intersecting shape?
source share