From b73f8eca0be59426e91143ccf5b4783d54a1f9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 12 Mar 2023 11:42:58 +0100 Subject: [PATCH] GL: document what's the reasonable value for Framebuffer::clearDepth(). --- src/Magnum/GL/AbstractFramebuffer.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Magnum/GL/AbstractFramebuffer.h b/src/Magnum/GL/AbstractFramebuffer.h index 1028ab52b..763a4b0f8 100644 --- a/src/Magnum/GL/AbstractFramebuffer.h +++ b/src/Magnum/GL/AbstractFramebuffer.h @@ -338,6 +338,11 @@ class MAGNUM_GL_EXPORT AbstractFramebuffer { * @param depth Value to clear with * @return Reference to self (for method chaining) * + * Note that, unlike the color and stencil buffer which are often + * cleared to a zero value, the depth buffer should be cleared to + * @cpp 1.0f @ce --- unless a different (or inverse) range was set in + * @ref Renderer::setDepthRange(), @cpp 0.0f @ce is the depth at + * the near plane, which isn't a desirable value to clear to. * @see @ref clear(), @fn_gl_keyword{ClearNamedFramebuffer}, eventually * @fn_gl{BindFramebuffer}, then @fn_gl_keyword{ClearBuffer} * @requires_gl30 Direct framebuffer clearing is not available in