[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glStencilMask Subroutine

Purpose

Controls the writing of individual bits in the stencil planes.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glStencilMask(GLuint Mask)

Parameters

Mask Specifies a bit mask to enable and disable writing of individual bits in the stencil planes. Initially, the mask is all 1s.

Description

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

Errors

GL_INVALID_OPERATION The glStencilMask subroutine is called between a call to glBegin and the corresponding call to glEnd.

Associated Gets

Associated gets for the glStencilMask subroutine are as follows. (See the glGet subroutine for more information.)

glGet with argument GL_STENCIL_WRITEMASK

glGet with argument GL_STENCIL_BITS.

Files

/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glBegin or glEnd subroutine, glColorMask subroutine, glDepthMask subroutine, glIndexMask subroutine, glStencilFunc subroutine, glStencilOp subroutine.

OpenGL Overview.


[ Previous | Next | Contents | Glossary | Home | Search ]