This reference page is linked to from the following overview topics: Nitrous Graphics SDK Extensions.
#include <RenderStates.h>
This class encapsulates a complete depth buffer and stencil buffer state.
Public Member Functions |
|
| DepthStencilState () | |
| virtual | ~DepthStencilState () |
| virtual void | SetDepthEnabled (bool value) |
| Set depth test state. |
|
| virtual bool | GetDepthEnabled () const |
| Get depth test state. |
|
| virtual void | SetDepthWriteEnabled (bool value) |
| Set whether depth write is allowed. |
|
| virtual bool | GetDepthWriteEnabled () const |
| Get whether depth write is allowed. |
|
| virtual void | SetDepthFunction (CompareFunction value) |
| Set depth buffer compare function. |
|
| virtual CompareFunction | GetDepthFunction () const |
| Get depth buffer compare function. |
|
| virtual void | SetStencilEnabled (bool value) |
| Set stencil buffer state. |
|
| virtual bool | GetStencilEnabled () const |
| Get stencil buffer state /return stencil
buffer state. |
|
| virtual void | SetStencilReadMask (unsigned char mask) |
| Set stencil buffer read mask. |
|
| virtual unsigned char | GetStencilReadMask () const |
| Get stencil buffer read mask. |
|
| virtual void | SetStencilWriteMask (unsigned char mask) |
| Set stencil buffer write mask. |
|
| virtual unsigned char | GetStencilWriteMask () const |
| Get stencil buffer write mask. |
|
| virtual StencilOperation & | GetFrontFaceOperation () |
| Get front face stencil operation /return
front face stencil operation. |
|
| virtual StencilOperation & | GetBackFaceOperation () |
| Get front back stencil operation /return
front back stencil operation. |
|
| virtual void | SetStencilReference (int value) |
| Set stencil reference value. |
|
| virtual int | GetStencilReference () const |
| Get stencil reference value. |
|
Protected Attributes |
|
| bool | mDepthEnabled |
| Depth test state Default value is true.
|
|
| bool | mDepthWriteEnabled |
| Indicates whether depth write is allowed
Default value is true. |
|
| CompareFunction | mDepthFunction |
| Depth buffer compare function. |
|
| bool | mStencilEnable |
| Stencil buffer state Default value is false.
|
|
| unsigned char | mStencilReadMask |
| Stencil buffer read mask Default value is
0xFF. |
|
| unsigned char | mStencilWriteMask |
| Stencil buffer write mask Default value is
0xFF. |
|
| StencilOperation | mFrontFaceOp |
| Front face stencil operation. |
|
| StencilOperation | mBackFaceOp |
| Back face stencil operation. |
|
| int | mReferenceStencil |
| Stencil reference value Default value is 0.
|
|
| virtual ~DepthStencilState | ( | ) | [inline, virtual] |
{}
| virtual void SetDepthEnabled | ( | bool | value | ) | [virtual] |
Set depth test state.
Default value is true /param value true to enable depth test, false to disable
| virtual bool GetDepthEnabled | ( | ) | const [virtual] |
| virtual void SetDepthWriteEnabled | ( | bool | value | ) | [virtual] |
Set whether depth write is allowed.
Default value is true /param value true to allow depth write, false to turn off
| virtual bool GetDepthWriteEnabled | ( | ) | const [virtual] |
Get whether depth write is allowed.
Default value is true /return true if depth write is enabled, false if not
| virtual void SetDepthFunction | ( | CompareFunction | value | ) | [virtual] |
Set depth buffer compare function.
Default value is CompareFunctionLess /param value depth compare function
| virtual CompareFunction GetDepthFunction | ( | ) | const [virtual] |
Get depth buffer compare function.
/return current depth compare function
| virtual void SetStencilEnabled | ( | bool | value | ) | [virtual] |
Set stencil buffer state.
Default value is false /param value true to enable stencil buffer, false to disable
| virtual bool GetStencilEnabled | ( | ) | const [virtual] |
Get stencil buffer state /return stencil buffer state.
| virtual void SetStencilReadMask | ( | unsigned char | mask | ) | [virtual] |
Set stencil buffer read mask.
Default value is 0xFF /param value stencil read mask
| virtual unsigned char GetStencilReadMask | ( | ) | const [virtual] |
| virtual void SetStencilWriteMask | ( | unsigned char | mask | ) | [virtual] |
Set stencil buffer write mask.
Default value is 0xFF /param value stencil write mask
| virtual unsigned char GetStencilWriteMask | ( | ) | const [virtual] |
| virtual StencilOperation& GetFrontFaceOperation | ( | ) | [virtual] |
Get front face stencil operation /return front face stencil operation.
| virtual StencilOperation& GetBackFaceOperation | ( | ) | [virtual] |
Get front back stencil operation /return front back stencil operation.
| virtual void SetStencilReference | ( | int | value | ) | [virtual] |
Set stencil reference value.
Default value is 0. /param value stencil reference value
| virtual int GetStencilReference | ( | ) | const [virtual] |
bool
mDepthEnabled [protected] |
Depth test state Default value is true.
bool
mDepthWriteEnabled [protected] |
Indicates whether depth write is allowed Default value is true.
CompareFunction
mDepthFunction [protected] |
bool
mStencilEnable [protected] |
Stencil buffer state Default value is false.
unsigned char
mStencilReadMask [protected] |
Stencil buffer read mask Default value is 0xFF.
unsigned char
mStencilWriteMask [protected] |
Stencil buffer write mask Default value is 0xFF.
StencilOperation
mFrontFaceOp [protected] |
Front face stencil operation.
StencilOperation
mBackFaceOp [protected] |
Back face stencil operation.
int
mReferenceStencil [protected] |
Stencil reference value Default value is 0.