glBlendFunc works using two values: the source color and the destination color. You are allowed to multiply these two values with glBlendFunc using the two arguments. For example, if you want standard blending, you'd write
1
| glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
meaning
1
| result = sourceColor * sourceAlpha + destinationColor * (1-sourceAlpha); |
If alpha is 1, destColor is multiplied by 0, and if alpha is 0.5, the source color and the destination color are mixed equally.
What do you want? You want to multiply the source color with the destination alpha, right?
1
| glBlendFunc(GL_DST_ALPHA, GL_ZERO); |
meaning
1
| result = sourceColor * destinationAlpha + destinationColor * 0 |
which can be simplified to
1
| result = sourceColor * destinationAlpha |
Your post says you want to discard any pixel that has any alpha at all. You cannot achieve this with exact effect with blending, but the above blend function is very similar and what I think you want. You can however do exactly what you asked about with the stencil test. Instead of writing whether a pixel should be "drawable" or not to the alpha channel, you would mark the pixel with a specific value and then disable rendering to pixels with that specific value using the stencil test.