The result is a white triangle. But I do not understand why! each color of second triangule should be multiplied by the alpha of the first triangle, but it doesn’t.
Why? The only thing it would change is the color of the second triangle. I commented that but I does not work. The second triangle is rendered in blue, But I think it should multiply that blue by the previous triangle’s alpha.
Left? Right? I think you do not understand me. I am painting 2 triangles, one over the other one with a blending function. The problem is: the color of the final triangle seems to be wrong, because I get a white triangle and it should be a grayscaled triangle.
Please, read the code in my first post and tell me which color should have the final triangle when rendered.
You have verified that you have requested and actually gotten a pixelformat with destination alpha channel?
If not, the glBlendFunc(GL_DST_ALPHA,GL_ZERO); will always use 1.0 for alpha.