glStencilOp

set front and back stencil test actions

Signature

glStencilOp( GLenum ( sfail ) , GLenum ( dpfail ) , GLenum ( dppass ) )-> void
glStencilOp( fail , zfail , zpass )

Parameters

VariablesDescription
sfail
Specifies the action to take when the stencil test fails. Eight symbolic constants are accepted: GL_KEEP , GL_ZERO , GL_REPLACE , GL_INCR , GL_INCR_WRAP , GL_DECR , GL_DECR_WRAP , and GL_INVERT . The initial value is GL_KEEP .
dpfail
Specifies the stencil action when the stencil test passes, but the depth test fails. dpfail accepts the same symbolic constants as sfail . The initial value is GL_KEEP .
dppass
Specifies the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. dppass accepts the same symbolic constants as sfail . The initial value is GL_KEEP .

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glStencilOp
OpenGLContext OpenGLContext/shadow/volume.py Lines: 241, 263
OpenGLContext OpenGLContext/shadow/passes.py Lines: 128, 316, 352
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 151, 159
{LGPL} PyMT pymt/graphx/stencil.py Lines: 21, 47, 82, 96, 110
{LGPL} Pyggel pyggel/misc.py Lines: 28, 39