hx3d  1
2D/3D Simple Game Framework
Public Types | Public Member Functions | Static Public Member Functions | List of all members
hx3d::graphics::Stencil Class Reference

2D stencil drawing. More...

#include <stencil.hpp>

Public Types

Public Member Functions

void setFunction (Function func, int ref, int mask)
 Set the stencil function. More...
 
void setOperation (Operation sfail, Operation dpfail, Operation dppass)
 Set the stencil operation. More...
 
void begin ()
 Begin to use the stencil.
 
void end ()
 End the stencil.
 

Static Public Member Functions

static void enable ()
 Enable stencil mode.
 
static void disable ()
 Disable stencil mode.
 

Detailed Description

2D stencil drawing.

Use this to hide/show elements following a shape or to apply a function over a specified shape.

Definition at line 34 of file stencil.hpp.

Member Enumeration Documentation

Stencil function.

Enumerator
Never 

Never hide.

Always 

Always hide.

Equal 

Hide when it's equal.

NotEqual 

Hide when it's not equal.

Less 

Hide when it's less.

Greater 

Hide when it's greater.

LessOrEqual 

Hide when it's less or equal.

GreaterOrEqual 

Hide when it's greater or equal.

Definition at line 39 of file stencil.hpp.

Stencil operation.

Enumerator
Keep 

Do nothing.

Zero 

Remove.

Replace 

Replace.

Increment 

Increment.

IncrementWrap 

Increment and wrap.

Decrement 

Decrement.

DecrementWrap 

Decrement and wrap.

Invert 

Invert.

Definition at line 61 of file stencil.hpp.

Member Function Documentation

void hx3d::graphics::Stencil::setFunction ( Function  func,
int  ref,
int  mask 
)

Set the stencil function.

Parameters
funcFunction
refRef
maskMask

Definition at line 34 of file stencil.cpp.

void hx3d::graphics::Stencil::setOperation ( Operation  sfail,
Operation  dpfail,
Operation  dppass 
)

Set the stencil operation.

Parameters
sfailOperation when the stencil function fail
dpfailOperation when the depth buffer test fail
dppassOperation when the depth buffer test pass

Definition at line 38 of file stencil.cpp.


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