FBO with depth buffer

Hi,

I have an FBO and a depth buffer and I have disabled depth writes via glDepthMask(…) so that fragments that I’ve generated won’t write depth values. Can I write depth values using gl_FragDepth in a fragment shader, or does glDepthMask(GL_FALSE) make the depth buffer read only?

Thanks.

The latter, no writes make it through if writes are disabled.
Not writing gl_FragDepth explicitly doesn’t mean you have no depth values.