/ comp / gb.opengl / gl / depthmask
Gl.DepthMask (gb.opengl)
Syntax

    STATIC SUB DepthMask ( Flag AS Boolean )

### Enable or disable writing into the depth buffer

#### Parameters

- Flag specifies whether the depth buffer is enabled for writing. If flag is FALSE, depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer writing is enabled.

#### Description

Gl.DepthMask specifies whether the depth buffer is enabled for writing. If flag is FALSE, depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer writing is enabled.

#### Errors

Gl.GL_INVALID_OPERATION is generated if Gl.DepthMask is called between a call to Gl.Begin and the corresponding call to Gl.End.

#### Associated Gets

Gl.GetDepthWritemask

### See also

Gl.ColorMask , Gl.DepthFunc , Gl.DepthRange , Gl.IndexMask, Gl.StencilMask