Z Buffer with transparencies.

Lets say I have a GL_QUAD, with a texture pasted onto it. This texture is of a circle.
The parts of the texture outside the circle have alpha of 0. Inside have alpha of 1.

So, in normal view, it looks like a circle, not a quad.

What happens in the zbuffer?
Does alpha have anything to do with it?

I am imagining not, and that I would get the full quad. Is this right?

You will normally get the full quad written to the zbuffer but you can stop this by culling fragments using alpha test to produce a circle instead.


glAlphaFunc(GL_GREATER, 0.0f);

You can mess around with the values used by the alpha test to suit your circumstances.