/ comp / gb.opengl / gl / clearstencil
Gl.ClearStencil (gb.opengl)
Syntax

    STATIC SUB ClearStencil ( Value AS Integer )

### Specify the clear value for the stencil buffer

#### Parameters

- Value specifies the index used when the stencil buffer is cleared. The default value is zero.

#### Description

Gl.ClearStencil specifies the index used by Gl.Clear to clear the stencil buffer. Value is masked with 2 m - 1, where m is the number of bits in the stencil buffer.

#### Errors

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

#### Associated Gets

Gl.GetStencilClearValue
Gl.GetStencilBits

### See also

Gl.Clear