When choosing the glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
blending function, you will have to premultiply your color. So, this means you will have to multiply every color component (red, green and blue) by the alpha value. In your case this would be: (1.0 * alpha, 0.0, 0.0, alpha)
. The blending function describes how the GPU will compute the final color as the result of the two blended colors. If you choose GL_ONE, GL_ONE_MINUS_SRC_ALPHA, you have this formula:
finalColor = srcColor + (1 - srcAlpha) * dstColor;
If you fill in your red color, you see:
finalColor = (1.0, 0.0, 0.0) + (1 - 0.5) * (0.0, 0.0, 0.0)
= (1.0, 0.0, 0.0)
That is why it looks pure red.
If you don't like that, then change the blending function to:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
If you use this function, the formula gets obviously:
finalColor = srcAlpha * srcColor + (1 - srcAlpha) * dstColor;
Plug in your red:
finalColor = 0.5 * (1.0, 0.0, 0.0) + (1.0 - 0.5) * (0.0, 0.0, 0.0)
= (0.5, 0.0, 0.0)
Note that premultiplying is good when you are working with images: it saves the GPU three multiplication per fragment.