The best workaround for high zFar/zNear values, I think, would be:

1) using the FP depth buffer,

2) glDepthFunc(GL_GREATER),

3) glClipControl(...,GL_ZERO_TO_ONE),

4) the following projection matrix:

Code :

| f/aspect 0 0 0 |
| |
| 0 f 0 0 |
P = | |
| 0 0 0 zNear |
| |
| 0 0 -1 0 |

where f = ctan(ViewAngleVertical/2),

aspect = Viewport.x / Viewport.y,

zNear: distance to the near clipping plane; this value could be very small (in 1e-XX range).

This setup will cull all the geometry behind the near clipping plane, and the resulting depth will decrease as the object get drawn further away asymptotically approaching 0 for the infinitely distant objects.

Obviously that will only work for FP buffers heavily exploiting the exponent part of the numbers in it's negative range (Xe-XXX), because 99% of depth values will be less than 0.000...