Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The glClearStencil function specifies the clear value for the stencil buffer.
void glClearStencil(
GLint s);
Parameters
- s
The index used when the stencil buffer is cleared. The default value is zero.
Remarks
The glClearStencil function specifies the index used by glClear to clear the stencil buffer. The s parameter is masked with 2*m* 1, where m is the number of bits in the stencil buffer.
The following functions retrieve information related to the glClearStencil function:
glGet with argument GL_STENCIL_CLEAR_VALUE
glGet with argument GL_STENCIL_BITS
Error Codes
The following is the error code generated and its condition.
Error code | Condition |
---|---|
GL_INVALID_OPERATION | glClearStencil was called between a call to glBegin and the corresponding call to glEnd. |
Requirements
** Windows NT/2000:** Requires Windows NT 3.5 or later.
** Windows 95/98:** Requires Windows 95 or later. Available as a redistributable for Windows 95.
** Header:** Declared in Gl.h.
** Library:** Use Opengl32.lib.