GLDEPTHMASK(3G)

    .SH "NAME" glDepthMask - enable or disable writing into the depth buffer
    .SH "C SPECIFICATION"

            .HP u void glDepthMask(GLboolean flag);

    .SH "PARAMETERS"

        .PP flag

                    Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE, depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer writing is enabled.

            .RE

        .SH "DESCRIPTION"
            .PP glDepthMask specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE, depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer writing is enabled.

        .SH "ASSOCIATED GETS"
            .PP glGet() with argument GL_DEPTH_WRITEMASK

        .SH "NOTES"
            .PP Even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled. In order to unconditionally write to the depth buffer, the depth test should be enabled and set to GL_ALWAYS (see glDepthFunc()).

        .SH "VERSION SUPPORT"
            .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ OpenGL Version T} T{ Function / Feature Name T}:T{ 2.0 T}:T{ 2.1 T}:T{ 3.0 T}:T{ 3.1 T}:T{ 3.2 T}:T{ 3.3 T}:T{ 4.0 T}:T{ 4.1 T}:T{ 4.2 T}:T{ 4.3 T}:T{ 4.4 T}:T{ 4.5 T} l c c c c c c c c c c c c. T{ glDepthMask T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}

        .SH "SEE ALSO"
            .PP glColorMask(), glDepthFunc(), glDepthRange(), glStencilMask()

        .SH "COPYRIGHT"
            .PP Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014 Khronos Group. This document is licensed under the SGI This document is licensed under the SGI Free Software B License. For details, see https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt.

COPYRIGHT
Copyright © 1991-2006 Silicon Graphics, Inc.
Copyright © 2010-2014 Khronos Group