Skip to content

Latest commit

 

History

History
117 lines (67 loc) · 3.1 KB

glstencilmask.md

File metadata and controls

117 lines (67 loc) · 3.1 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
glStencilMask function (Gl.h)
The glStencilMask function controls the writing of individual bits in the stencil planes.
c586f9db-bad5-4f06-a194-a8d979842d0c
glStencilMask function OpenGL
apiref
glStencilMask
opengl32.dll
DllExport
reference
05/31/2018

glStencilMask function

The glStencilMask function controls the writing of individual bits in the stencil planes.

Syntax

void WINAPI glStencilMask(
   GLuint mask
);

Parameters

mask

A bit mask to enable and disable writing of individual bits in the stencil planes. Initially, the mask is all ones.

Return value

This function does not return a value.

Error codes

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

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

Remarks

The glStencilMask function controls the writing of individual bits in the stencil planes. The least significant n bits of mask, where n is the number of bits in the stencil buffer, specify a mask. Wherever a one appears in the mask, the corresponding bit in the stencil buffer is made writable. Where a zero appears, the bit is write-protected. Initially, all bits are enabled for writing.

The following functions retrieve information related to glStencilMask:

glGet with argument GL_STENCIL_WRITEMASK

glGet with argument GL_STENCIL_BITS

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Gl.h
Library
Opengl32.lib
DLL
Opengl32.dll

See also

glBegin

glColorMask

glDepthMask

glEnd

glIndexMask

glStencilFunc

glStencilOp