Extension to glPolygonOffset

It would be nice to set some mode where the behavior of glPolygonOffset is modified as follows: the offset is added to the depth value to carry out the depth test (as usual); but, if the depth test passes, the offset is subtracted away from the depth value before writing to the depth buffer, so that the depth value that is written to the depth buffer is the “actual” (non-offset) depth value of the polygon.

This would be useful when using GL_POLYGON_SMOOTH with GL_SRC_ALPHA_SATURATE, so that the depth buffer doesn’t have to be turned off to get polygon smoothing. This would give the programmer the option of having adequate, fast edge antialiasing that doesn’t take extra memory or a whole lot of extra cycles, without having to sacrifice the use of the depth buffer.

Maybe the glPolygonOffset spec will do.

How so?

Thinking about this some more, I don’t think this would fix the antialiasing problem, so, never mind…