|
Public Types |
enum | Function {
NEVER = GL_NEVER,
LESS = GL_LESS,
EQUAL = GL_EQUAL,
LEQUAL = GL_LEQUAL,
GREATER = GL_GREATER,
NOTEQUAL = GL_NOTEQUAL,
GEQUAL = GL_GEQUAL,
ALWAYS = GL_ALWAYS
} |
enum | Operation {
KEEP = GL_KEEP,
ZERO = GL_ZERO,
REPLACE = GL_REPLACE,
INCR = GL_INCR,
DECR = GL_DECR,
INVERT = GL_INVERT
} |
Public Member Functions |
| Stencil () |
| Stencil (const Stencil &stencil, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| Copy constructor using CopyOp to manage deep vs shallow copy.
|
| META_StateAttribute (osg, Stencil, STENCIL) |
virtual int | compare (const StateAttribute &sa) const |
| return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
|
virtual bool | getModeUsage (ModeUsage &usage) const |
| Return the modes associated with this StateAttribute.
|
void | setFunction (Function func, int ref, unsigned int mask) |
void | setFunction (Function func) |
Function | getFunction () const |
void | setFunctionRef (int ref) |
int | getFunctionRef () const |
void | setFunctionMask (unsigned int mask) |
unsigned int | getFunctionMask () const |
void | setOperation (Operation sfail, Operation zfail, Operation zpass) |
| set the operations to apply when the various stencil and depth tests fail or pass.
|
void | setStencilFailOperation (Operation sfail) |
| set the operation when the stencil test fails.
|
Operation | getStencilFailOperation () const |
| get the operation when the stencil test fails.
|
void | setStencilPassAndDepthFailOperation (Operation zfail) |
| set the operation when the stencil test passes but the depth test fails.
|
Operation | getStencilPassAndDepthFailOperation () const |
| get the operation when the stencil test passes but the depth test fails.
|
void | setStencilPassAndDepthPassOperation (Operation zpass) |
| set the operation when both the stencil test and the depth test pass.
|
Operation | getStencilPassAndDepthPassOperation () const |
| get the operation when both the stencil test and the depth test pass.
|
void | setWriteMask (unsigned int mask) |
unsigned int | getWriteMask () const |
virtual void | apply (State &state) const |
| apply the OpenGL state attributes.
|
Protected Member Functions |
virtual | ~Stencil () |
Protected Attributes |
Function | _func |
int | _funcRef |
unsigned int | _funcMask |
Operation | _sfail |
Operation | _zfail |
Operation | _zpass |
unsigned int | _writeMask |