Is there a way to use the contents of the depth buffer without updating it? I know it is possible to do the other way around (updating without testing):
glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_ALWAYS );
The code snippet above writes to the z-buffer without testing for the contents of the z-buffer, but I want to enable testing and disable writing.
I know I can solve this with a stencil buffer, but it seems like an incredible overkill since the information is there anyhow (in the Z-buffer and from my fragment).
[This message has been edited by marcus256 (edited 11-28-2001).]