Basic Image AlgorithmS Library
2.8.0
|
Defines the usage of the stencil buffer. More...
#include <OpenGLFramework/Base/glfStencilBufferMode.hh>
Public Member Functions | |
void | Bind () const |
Binds the stencil buffer mode. More... | |
glfStencilBufferMode () | |
void | SetReferenceValue (GLint referenceValue) |
Sets the reference value for the comprison function. More... | |
void | SetStencilFunc (GLenum comparisonFunc) |
Sets the stencil buffer comparison function. More... | |
void | SetStencilMask (GLuint mask) |
Sets the mask of bits that shall be considered for stencil test from the stencil mask and the stencil buffer. More... | |
void | SetStencilOperation (GLenum stencilFail, GLenum stencilPassZFail, GLenum stencilPassZPass) |
Defines the operation of the stencil test. More... | |
void | SetStencilTest (bool enable) |
Sets whether to use stencil buffer tests. More... | |
virtual | ~glfStencilBufferMode () |
Static Public Attributes | |
static const glfStencilBufferMode | DEFAULT |
The default stencil buffer mode. More... | |
Defines the usage of the stencil buffer.
Definition at line 37 of file glfStencilBufferMode.hh.
glfStencilBufferMode::glfStencilBufferMode | ( | ) |
Definition at line 39 of file glfStencilBufferMode.cpp.
|
inlinevirtual |
Definition at line 41 of file glfStencilBufferMode.hh.
void glfStencilBufferMode::Bind | ( | ) | const |
Binds the stencil buffer mode.
Definition at line 77 of file glfStencilBufferMode.cpp.
Referenced by BIAS::glfBatch::SetDefaultRenderStates().
void glfStencilBufferMode::SetReferenceValue | ( | GLint | referenceValue | ) |
Sets the reference value for the comprison function.
Default is 0.
Definition at line 64 of file glfStencilBufferMode.cpp.
void glfStencilBufferMode::SetStencilFunc | ( | GLenum | comparisonFunc | ) |
Sets the stencil buffer comparison function.
Valid values are: GL_NEVER, GL_LESS, GL_LEQUAL, GL_EQUAL, GL_GEQUAL, GL_GREATER, GL_NOTEQUAL, GL_ALWAYS.
Definition at line 59 of file glfStencilBufferMode.cpp.
void glfStencilBufferMode::SetStencilMask | ( | GLuint | mask | ) |
Sets the mask of bits that shall be considered for stencil test from the stencil mask and the stencil buffer.
The default is a the whole range of values.
Definition at line 54 of file glfStencilBufferMode.cpp.
void glfStencilBufferMode::SetStencilOperation | ( | GLenum | stencilFail, |
GLenum | stencilPassZFail, | ||
GLenum | stencilPassZPass | ||
) |
Defines the operation of the stencil test.
For each argument the valid values are: GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, GL_INCR_WRAP, GL_DECR, GL_DECR_WRAP, GL_INVERT. The default is GL_KEEP for all arguments.
stencilFail | what shall to be done when the stencil compare test fails. |
stencilPassZFail | what shall to be done when the stencil compare test passes but the z-buffer test fails. |
stencilPassZpass | what shall to be done when the stencil compare test passes and the z-buffer test passes. |
Definition at line 70 of file glfStencilBufferMode.cpp.
void glfStencilBufferMode::SetStencilTest | ( | bool | enable | ) |
Sets whether to use stencil buffer tests.
Definition at line 49 of file glfStencilBufferMode.cpp.
|
static |
The default stencil buffer mode.
Definition at line 92 of file glfStencilBufferMode.hh.
Referenced by BIAS::glfBatch::glfBatch(), and BIAS::glfBatch::SetDefaultRenderStates().