Public Types | |
enum | Face { FRONT = 0, BACK = 1 } |
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, INCR_WRAP = GL_INCR_WRAP, DECR_WRAP = GL_DECR_WRAP } |
Public Member Functions | |
StencilTwoSided () | |
StencilTwoSided (const StencilTwoSided &stencil, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_StateAttribute (osg, StencilTwoSided, STENCIL) | |
virtual int | compare (const StateAttribute &sa) const |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. | |
virtual bool | getModeUsage (StateAttribute::ModeUsage &usage) const |
Return the modes associated with this StateAttribute. | |
void | setFunction (Face face, Function func, int ref, unsigned int mask) |
void | setFunction (Face face, Function func) |
Function | getFunction (Face face) const |
void | setFunctionRef (Face face, int ref) |
int | getFunctionRef (Face face) const |
void | setFunctionMask (Face face, unsigned int mask) |
unsigned int | getFunctionMask (Face face) const |
void | setOperation (Face face, Operation sfail, Operation zfail, Operation zpass) |
set the operations to apply when the various stencil and depth tests fail or pass. | |
void | setStencilFailOperation (Face face, Operation sfail) |
set the operation when the stencil test fails. | |
Operation | getStencilFailOperation (Face face) const |
get the operation when the stencil test fails. | |
void | setStencilPassAndDepthFailOperation (Face face, Operation zfail) |
set the operation when the stencil test passes but the depth test fails. | |
Operation | getStencilPassAndDepthFailOperation (Face face) const |
get the operation when the stencil test passes but the depth test fails. | |
void | setStencilPassAndDepthPassOperation (Face face, Operation zpass) |
set the operation when both the stencil test and the depth test pass. | |
Operation | getStencilPassAndDepthPassOperation (Face face) const |
get the operation when both the stencil test and the depth test pass. | |
void | setWriteMask (Face face, unsigned int mask) |
unsigned int | getWriteMask (Face face) const |
virtual void | apply (State &state) const |
apply the OpenGL state attributes. | |
Static Public Member Functions | |
static Extensions * | getExtensions (unsigned int contextID, bool createIfNotInitalized) |
Function to call to get the extension of a specified context. | |
static void | setExtensions (unsigned int contextID, Extensions *extensions) |
The setExtensions method allows users to override the extensions across graphics contexts. | |
Protected Member Functions | |
virtual | ~StencilTwoSided () |
Protected Attributes | |
Function | _func [2] |
int | _funcRef [2] |
unsigned int | _funcMask [2] |
Operation | _sfail [2] |
Operation | _zfail [2] |
Operation | _zpass [2] |
unsigned int | _writeMask [2] |
Classes | |
class | Extensions |
Extensions class which encapsulates the querying of extensions and associated function pointers, and provide convenience wrappers to check for the extensions or use the associated functions. More... |
osg::StencilTwoSided::StencilTwoSided | ( | ) |
osg::StencilTwoSided::StencilTwoSided | ( | const StencilTwoSided & | stencil, | |
const CopyOp & | copyop = CopyOp::SHALLOW_COPY | |||
) |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::StencilTwoSided::~StencilTwoSided | ( | ) | [protected, virtual] |
osg::StencilTwoSided::META_StateAttribute | ( | osg | , | |
StencilTwoSided | , | |||
STENCIL | ||||
) |
virtual int osg::StencilTwoSided::compare | ( | const StateAttribute & | sa | ) | const [virtual] |
virtual bool osg::StencilTwoSided::getModeUsage | ( | StateAttribute::ModeUsage & | ) | const [inline, virtual] |
void osg::StencilTwoSided::setFunction | ( | Face | face, | |
Function | func, | |||
int | ref, | |||
unsigned int | mask | |||
) | [inline] |
void osg::StencilTwoSided::setFunctionRef | ( | Face | face, | |
int | ref | |||
) | [inline] |
int osg::StencilTwoSided::getFunctionRef | ( | Face | face | ) | const [inline] |
void osg::StencilTwoSided::setFunctionMask | ( | Face | face, | |
unsigned int | mask | |||
) | [inline] |
unsigned int osg::StencilTwoSided::getFunctionMask | ( | Face | face | ) | const [inline] |
void osg::StencilTwoSided::setOperation | ( | Face | face, | |
Operation | sfail, | |||
Operation | zfail, | |||
Operation | zpass | |||
) | [inline] |
set the operations to apply when the various stencil and depth tests fail or pass.
First parameter is to control the operation when the stencil test fails. The second parameter is to control the operation when the stencil test passes, but depth test fails. The third parameter controls the operation when both the stencil test and depth pass. Ordering of parameter is the same as if using glStencilOp(,,).
set the operation when the stencil test fails.
get the operation when the stencil test fails.
void osg::StencilTwoSided::setStencilPassAndDepthFailOperation | ( | Face | face, | |
Operation | zfail | |||
) | [inline] |
set the operation when the stencil test passes but the depth test fails.
get the operation when the stencil test passes but the depth test fails.
void osg::StencilTwoSided::setStencilPassAndDepthPassOperation | ( | Face | face, | |
Operation | zpass | |||
) | [inline] |
set the operation when both the stencil test and the depth test pass.
get the operation when both the stencil test and the depth test pass.
void osg::StencilTwoSided::setWriteMask | ( | Face | face, | |
unsigned int | mask | |||
) | [inline] |
unsigned int osg::StencilTwoSided::getWriteMask | ( | Face | face | ) | const [inline] |
virtual void osg::StencilTwoSided::apply | ( | State & | ) | const [virtual] |
apply the OpenGL state attributes.
The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.
Reimplemented from osg::StateAttribute.
static Extensions* osg::StencilTwoSided::getExtensions | ( | unsigned int | contextID, | |
bool | createIfNotInitalized | |||
) | [static] |
Function to call to get the extension of a specified context.
If the Exentsion object for that context has not yet been created and the 'createIfNotInitalized' flag been set to false then returns NULL. If 'createIfNotInitalized' is true then the Extensions object is automatically created. However, in this case the extension object will only be created with the graphics context associated with ContextID.
static void osg::StencilTwoSided::setExtensions | ( | unsigned int | contextID, | |
Extensions * | extensions | |||
) | [static] |
The setExtensions method allows users to override the extensions across graphics contexts.
Typically used when you have different extensions supported across graphics pipes but need to ensure that they all use the same low common denominator extensions.
Function osg::StencilTwoSided::_func[2] [protected] |
int osg::StencilTwoSided::_funcRef[2] [protected] |
unsigned int osg::StencilTwoSided::_funcMask[2] [protected] |
Operation osg::StencilTwoSided::_sfail[2] [protected] |
Operation osg::StencilTwoSided::_zfail[2] [protected] |
Operation osg::StencilTwoSided::_zpass[2] [protected] |
unsigned int osg::StencilTwoSided::_writeMask[2] [protected] |