Export (0) Print
Expand All
Expand Minimize

glDepthMask function

Applies to: desktop apps only

The glDepthMask function enables or disables writing into the depth buffer.

Syntax

void WINAPI glDepthMask(
  GLboolean flag
);

Parameters

flag

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

Return value

This function does not return a value.

Error codes

The following error code can be retrieved by the glGetError function.

NameMeaning
GL_INVALID_OPERATION

The function was called between a call to glBegin and the corresponding call to glEnd.

Remarks

The following function retrieves information related to glDepthMask:

glGet with argument GL_DEPTH_WRITEMASK

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Gl.h

Library

Opengl32.lib

DLL

Opengl32.dll

See also

glBegin
glColorMask
glDepthFunc
glDepthRange
glEnd
glGet
glIndexMask
glStencilMask

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft