OSG
3.4.0
|
#include <StencilTwoSided.h>
Protected Member Functions | |
virtual | ~StencilTwoSided () |
![]() | |
virtual | ~StateAttribute () |
void | addParent (osg::StateSet *object) |
void | removeParent (osg::StateSet *object) |
![]() | |
virtual | ~Object () |
![]() | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
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] |
![]() | |
ParentList | _parents |
ref_ptr< ShaderComponent > | _shaderComponent |
ref_ptr< StateAttributeCallback > | _updateCallback |
ref_ptr< StateAttributeCallback > | _eventCallback |
![]() | |
std::string | _name |
DataVariance | _dataVariance |
osg::UserDataContainer * | _userDataContainer |
![]() | |
OpenThreads::AtomicPtr | _observerSet |
OpenThreads::Atomic | _refCount |
Additional Inherited Members | |
![]() | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
static void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
static bool | getThreadSafeReferenceCounting () |
static void | setDeleteHandler (DeleteHandler *handler) |
static DeleteHandler * | getDeleteHandler () |
Provides OpenGL two sided stencil functionality, also known as separate stencil. It enables to specify different stencil function for front and back facing polygons. Two sided stenciling is used usually to eliminate the need of two rendering passes when using standard stenciling functions. See also
Two sided stenciling is available since OpenGL 2.0. It is also supported by EXT_stencil_two_side extension especially on Nvidia cards. Another extension introduced by ATI is ATI_separate_stencil. However, ATI's extension is limited to have reference and mask value the same for both faces. ATI's extension is currently not supported by the current implementation.
osg::StencilTwoSided does nothing if OpenGL 2.0 or EXT_stencil_two_side are not available.
Definition at line 38 of file StencilTwoSided.h.
Enumerator | |
---|---|
FRONT | |
BACK |
Definition at line 59 of file StencilTwoSided.h.
Enumerator | |
---|---|
NEVER | |
LESS | |
EQUAL | |
LEQUAL | |
GREATER | |
NOTEQUAL | |
GEQUAL | |
ALWAYS |
Definition at line 65 of file StencilTwoSided.h.
Enumerator | |
---|---|
KEEP | |
ZERO | |
REPLACE | |
INCR | |
DECR | |
INVERT | |
INCR_WRAP | |
DECR_WRAP |
Definition at line 94 of file StencilTwoSided.h.
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.
|
protectedvirtual |
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.
|
virtual |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
Implements osg::StateAttribute.
Definition at line 85 of file StencilTwoSided.h.
|
inline |
Definition at line 91 of file StencilTwoSided.h.
|
inline |
Definition at line 88 of file StencilTwoSided.h.
|
inlinevirtual |
Return the modes associated with this StateAttribute.
Reimplemented from osg::StateAttribute.
Definition at line 53 of file StencilTwoSided.h.
get the operation when the stencil test fails.
Definition at line 124 of file StencilTwoSided.h.
get the operation when the stencil test passes but the depth test fails.
Definition at line 130 of file StencilTwoSided.h.
get the operation when both the stencil test and the depth test pass.
Definition at line 136 of file StencilTwoSided.h.
|
inline |
Definition at line 141 of file StencilTwoSided.h.
osg::StencilTwoSided::META_StateAttribute | ( | osg | , |
StencilTwoSided | , | ||
STENCIL | |||
) |
|
inline |
Definition at line 77 of file StencilTwoSided.h.
Definition at line 84 of file StencilTwoSided.h.
Definition at line 90 of file StencilTwoSided.h.
Definition at line 87 of file StencilTwoSided.h.
|
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(,,).
Definition at line 113 of file StencilTwoSided.h.
set the operation when the stencil test fails.
Definition at line 121 of file StencilTwoSided.h.
|
inline |
set the operation when the stencil test passes but the depth test fails.
Definition at line 127 of file StencilTwoSided.h.
|
inline |
set the operation when both the stencil test and the depth test pass.
Definition at line 133 of file StencilTwoSided.h.
Definition at line 139 of file StencilTwoSided.h.
|
protected |
Definition at line 150 of file StencilTwoSided.h.
|
protected |
Definition at line 152 of file StencilTwoSided.h.
|
protected |
Definition at line 151 of file StencilTwoSided.h.
|
protected |
Definition at line 154 of file StencilTwoSided.h.
|
protected |
Definition at line 158 of file StencilTwoSided.h.
|
protected |
Definition at line 155 of file StencilTwoSided.h.
|
protected |
Definition at line 156 of file StencilTwoSided.h.