This class defines the stencil buffer operation mode. More...
#include <Luminous/StencilMode.hpp>
Public Types | |
| enum | Function { Never = GL_NEVER, Less = GL_LESS, LessEqual = GL_LEQUAL, Greater = GL_GREATER, GreaterEqual = GL_GEQUAL, Equal = GL_EQUAL, NotEqual = GL_NOTEQUAL, Always = GL_ALWAYS } |
| Enumeration for stencil test See http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml for details. More... | |
| enum | Operation { Keep = GL_KEEP, Zero = GL_ZERO, Replace = GL_REPLACE, Increment = GL_INCR, IncrementWrap = GL_INCR_WRAP, Decrement = GL_DECR, DecrementWrap = GL_DECR_WRAP, Invert = GL_INVERT } |
| Enumeration for stencil actions See http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml for details. More... | |
Public Member Functions | |
| Operation | backDepthFailOp () const |
| Returns stencil operation when back facing primitive doesn't pass depth test. More... | |
| Function | backFunction () const |
| Returns test function used for back facing primitives. More... | |
| unsigned int | backMaskValue () const |
| Returns mask value used in stencil tests of back facing primitives. More... | |
| Operation | backPassOp () const |
| Returns stencil operation when back facing primitive passes both stencil and depth test. More... | |
| int | backRefValue () const |
| Returns reference value used in stencil tests of back facing primitives. More... | |
| Operation | backStencilFailOp () const |
| Returns stencil operation when back facing primitive doesn't pass stencil test. More... | |
| LUMINOUS_API bool | equal (const StencilMode &o) const |
| Equality comparison of stencil modes. More... | |
| Operation | frontDepthFailOp () const |
| Returns stencil operation when front facing primitive doesn't pass depth test. More... | |
| Function | frontFunction () const |
| Returns test function used for front facing primitives. More... | |
| unsigned int | frontMaskValue () const |
| Returns mask value used in stencil tests of front facing primitives. More... | |
| Operation | frontPassOp () const |
| Returns stencil operation when front facing primitive passes both stencil and depth test. More... | |
| int | frontRefValue () const |
| Returns reference value used in stencil tests of front facing primitives. More... | |
| Operation | frontStencilFailOp () const |
| Returns stencil operation when front facing primitive doesn't pass stencil test. More... | |
| LUMINOUS_API void | setFunction (Face face, Function function, int ref, unsigned int mask) |
| Set test functionality for stencil operations. More... | |
| LUMINOUS_API void | setOperation (Face face, Operation stencilFail, Operation depthFail, Operation pass) |
| Set stencil operations. More... | |
| LUMINOUS_API | StencilMode () |
| Construct new StencilMode object. | |
Static Public Member Functions | |
| static StencilMode | Default () |
| Returns the default StencilMode object. More... | |
This class defines the stencil buffer operation mode.
Back and front faces of the primitives have both their separate and own stencil operations.
Enumeration for stencil test See http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml for details.
Enumeration for stencil actions See http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml for details.
|
inline |
Returns stencil operation when back facing primitive doesn't pass depth test.
|
inline |
Returns test function used for back facing primitives.
|
inline |
Returns mask value used in stencil tests of back facing primitives.
|
inline |
Returns stencil operation when back facing primitive passes both stencil and depth test.
|
inline |
Returns reference value used in stencil tests of back facing primitives.
|
inline |
Returns stencil operation when back facing primitive doesn't pass stencil test.
|
inlinestatic |
Returns the default StencilMode object.
| LUMINOUS_API bool Luminous::StencilMode::equal | ( | const StencilMode & | o | ) | const |
Equality comparison of stencil modes.
| o | Other StencilMode |
|
inline |
Returns stencil operation when front facing primitive doesn't pass depth test.
|
inline |
Returns test function used for front facing primitives.
|
inline |
Returns mask value used in stencil tests of front facing primitives.
|
inline |
Returns stencil operation when front facing primitive passes both stencil and depth test.
|
inline |
Returns reference value used in stencil tests of front facing primitives.
|
inline |
Returns stencil operation when front facing primitive doesn't pass stencil test.
| LUMINOUS_API void Luminous::StencilMode::setFunction | ( | Face | face, |
| Function | function, | ||
| int | ref, | ||
| unsigned int | mask | ||
| ) |
Set test functionality for stencil operations.
| face | Facing of the primitives for this stencil test |
| function | Test function to use |
| ref | Reference value to use in stencil tests |
| mask | Mask to use in stencil operations |
| LUMINOUS_API void Luminous::StencilMode::setOperation | ( | Face | face, |
| Operation | stencilFail, | ||
| Operation | depthFail, | ||
| Operation | pass | ||
| ) |
Set stencil operations.
| face | Facing of the primitives for this stencil operation |
| stencilFail | Action to take when stencil test fails |
| depthFail | Action to take if stencil test passes and depth test fails |
| pass | Action to take when both stencil and depth test passes |