Is it possible to set a depth function like
equal C with C being a constant when rendering a mesh?
I would like to render a skybox at the end of my scene but only where nothing has already been drawn to the frame buffer. So, the easiest thing would be to set the depth function for the skybox to be
It must be possible to do this with a stencil buffer, but it seems overkill to me.