Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Attributes | List of all members
BIAS::glfStencilBufferMode Class Reference

Defines the usage of the stencil buffer. More...

#include <OpenGLFramework/Base/glfStencilBufferMode.hh>

+ Collaboration diagram for BIAS::glfStencilBufferMode:

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...
 

Detailed Description

Defines the usage of the stencil buffer.

Author
bartczak 02/2009

Definition at line 37 of file glfStencilBufferMode.hh.

Constructor & Destructor Documentation

glfStencilBufferMode::glfStencilBufferMode ( )

Definition at line 39 of file glfStencilBufferMode.cpp.

virtual BIAS::glfStencilBufferMode::~glfStencilBufferMode ( )
inlinevirtual

Definition at line 41 of file glfStencilBufferMode.hh.

Member Function Documentation

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.

Parameters
stencilFailwhat shall to be done when the stencil compare test fails.
stencilPassZFailwhat shall to be done when the stencil compare test passes but the z-buffer test fails.
stencilPassZpasswhat 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.

Note
: This must be enabled, even if you only want to write to the stencil buffer.
Attention
: Per default the test is disabled even if you create an instance and bind it.

Definition at line 49 of file glfStencilBufferMode.cpp.

Member Data Documentation

const glfStencilBufferMode glfStencilBufferMode::DEFAULT
static

The default stencil buffer mode.

Definition at line 92 of file glfStencilBufferMode.hh.

Referenced by BIAS::glfBatch::glfBatch(), and BIAS::glfBatch::SetDefaultRenderStates().


The documentation for this class was generated from the following files: