![]() |
CUGL 4.0
Cornell University Game Library
|
#include <CUGraphicsBase.h>
Public Member Functions | |
| StencilState () | |
| StencilState (StencilMode mode) | |
| StencilState (const StencilState &state) | |
| StencilState & | set (StencilMode mode) |
| StencilState & | operator= (StencilMode mode) |
| StencilState & | operator= (const StencilState &state) |
| bool | operator== (const StencilState &state) const noexcept |
| bool | operator!= (const StencilState &state) const noexcept |
| size_t | hash () |
Public Attributes | |
| StencilOp | failOp |
| StencilOp | passOp |
| StencilOp | depthFailOp |
| CompareOp | compareOp |
| Uint8 | reference |
| Uint8 | compareMask |
| Uint8 | writeMask |
This class represents the state of the current stencil test
This class is used for fine-tuned control of the stencil buffer. For most application StencilMode should be adequate. Note that changing any of these values in Vulkans requires a pipeline swap.
| cugl::graphics::StencilState::StencilState | ( | ) |
Creates default stencil test.
| cugl::graphics::StencilState::StencilState | ( | StencilMode | mode | ) |
Creates a stencil test for the given mode
Note that it is not sufficient to create a stencil test object from a mode. Modes often set other parameters in the graphics pipeline. Hence this constructor should never be used by the game developer.
| mode | The stencil test mode |
| cugl::graphics::StencilState::StencilState | ( | const StencilState & | state | ) |
Creates a copy of the given stencil test
| state | The stencil test to copy |
| size_t cugl::graphics::StencilState::hash | ( | ) |
Returns a hash code for this object.
This hash is used to manage pipeline swaps in Vulkan. It has no use in OpenGL.
|
noexcept |
Returns true if the given stencil test is not equal to this object
| state | The stencil test to compare |
| StencilState & cugl::graphics::StencilState::operator= | ( | const StencilState & | state | ) |
Assigns this object to be a copy of the given stencil test
| state | The stencil test to copy |
| StencilState & cugl::graphics::StencilState::operator= | ( | StencilMode | mode | ) |
Assigns this object to be equivalent to the given stencil mode.
Note that it is not sufficient to create a stencil test object from a mode. Modes often set other parameters in the graphics pipeline. Hence this assignment should never be used by the game developer.
| mode | The stencil test mode |
|
noexcept |
Returns true if the given stencil test is equal to this object
| state | The stencil test to compare |
| StencilState & cugl::graphics::StencilState::set | ( | StencilMode | mode | ) |
Assigns this object to be equivalent to the given stencil mode.
Note that it is not sufficient to create a stencil test object from a mode. Modes often set other parameters in the graphics pipeline. Hence this assignment should never be used by the game developer.
| mode | The stencil test mode |
| Uint8 cugl::graphics::StencilState::compareMask |
The mask to apply to the value before comparison
| CompareOp cugl::graphics::StencilState::compareOp |
The comparison operator fo the stencil test
| StencilOp cugl::graphics::StencilState::depthFailOp |
The action performed when the stencil test passes, but the depth test fails
| StencilOp cugl::graphics::StencilState::failOp |
The action performed when the stencil test fails
| StencilOp cugl::graphics::StencilState::passOp |
The action performed when the stencil test passes
| Uint8 cugl::graphics::StencilState::reference |
The reference value used by the comparison operation
| Uint8 cugl::graphics::StencilState::writeMask |
The mask to apply to the value written by the stencil operation