Describes pipeline state.
More...
#include <State.h>
|
| Stamp | getStamp () const |
| | Get the current stamp. More...
|
| |
| std::string | getKey () const |
| |
| const Flags & | getFlags () const |
| |
| void | setStencilTest (bool enabled, uint8 frontWriteMask, StencilTest frontTest, uint8 backWriteMask, StencilTest backTest) |
| |
| void | setStencilTest (bool enabled, uint8 frontWriteMask, StencilTest frontTest) |
| |
| void | setSampleMask (uint32 mask) |
| |
| uint32 | getSampleMask () const |
| |
| void | setBlendFunction (bool enabled, BlendArg sourceColor, BlendOp operationColor, BlendArg destinationColor, BlendArg sourceAlpha, BlendOp operationAlpha, BlendArg destinationAlpha) |
| |
| void | setBlendFunction (bool enabled, BlendArg source, BlendOp operation, BlendArg destination) |
| |
| void | setColorWriteMask (ColorMask mask) |
| |
| void | setColorWriteMask (bool red, bool green, bool blue, bool alpha) |
| | Sets which color channels can be written to. More...
|
| |
| Signature | getSignature () const |
| |
|
| State (const Data &values) |
| | For convenience, create a State from the values directly.
|
| |
| const Data & | getValues () const |
| |
|
|
Data | _values |
| | Full description of the state.
|
| |
|
Signature | _signature { 0 } |
| | Used to tell which fields have default values and which are changed.
|
| |
|
Stamp | _stamp { 0 } |
| | Incremented on changes and used to determine if API-specific backend object needs updating.
|
| |
Describes pipeline state.
◆ Signature
The signature of the state tells which fields of the state are not default. this way during rendering the Backend can compare it's current state and try to minimize the job to do.
◆ Field
All the possible fields NOTE: If you change this, you must update GLBackend::GLState::_resetStateCommands
◆ evalSignature()
- Parameters
-
| state | State for which singature will be computed. |
- Returns
- Signature telling which state fields are non-default for current state.
◆ getFlags()
| const Flags& gpu::State::getFlags |
( |
| ) |
const |
|
inline |
- Returns
- Object containing settings enabling or disabling various parts of the pipeline.
◆ getKey()
| std::string State::getKey |
( |
| ) |
const |
- Returns
- Returns a text string that is unique to a given pipeline state setup.
◆ getSampleMask()
| uint32 gpu::State::getSampleMask |
( |
| ) |
const |
|
inline |
Gets the current sample mask. Samples that are written to are decided by bit AND of this mask and given fragment's coverage.
- Returns
- Current sample mask.
◆ getSignature()
- Returns
- Current signature telling which state fields are not default.
◆ getStamp()
| Stamp gpu::State::getStamp |
( |
| ) |
const |
|
inline |
Get the current stamp.
Stamp is used to detect changes in the pipeline state.
- Returns
- Current stamp.
◆ getValues()
| const Data& gpu::State::getValues |
( |
| ) |
const |
|
inline |
- Returns
- Object containing all properties of the current state.
◆ setBlendFunction() [1/2]
| void gpu::State::setBlendFunction |
( |
bool |
enabled, |
|
|
BlendArg |
source, |
|
|
BlendOp |
operation, |
|
|
BlendArg |
destination |
|
) |
| |
|
inline |
- Parameters
-
| enabled | Is blending enabled? |
| source | Determines how source (both color and alpha) will be used. |
| operation | Type of operation that will be performed on both color and alpha if blending is enabled. |
| destination | Determines how destination (both color and alpha) will be used. |
◆ setBlendFunction() [2/2]
| void gpu::State::setBlendFunction |
( |
bool |
enabled, |
|
|
BlendArg |
sourceColor, |
|
|
BlendOp |
operationColor, |
|
|
BlendArg |
destinationColor, |
|
|
BlendArg |
sourceAlpha, |
|
|
BlendOp |
operationAlpha, |
|
|
BlendArg |
destinationAlpha |
|
) |
| |
|
inline |
- Parameters
-
| enabled | Is blending enabled? |
| sourceColor | Determines how source color will be used. |
| operationColor | Type of operation that will be performed on color if blending is enabled. |
| destinationColor | Determines how destination color will be used. |
| sourceAlpha | Determines how source alpha will be used. |
| operationAlpha | Type of operation that will be performed on alpha if blending is enabled. |
| destinationAlpha | Determines how destination alpha will be used. |
◆ setColorWriteMask() [1/2]
| void gpu::State::setColorWriteMask |
( |
bool |
red, |
|
|
bool |
green, |
|
|
bool |
blue, |
|
|
bool |
alpha |
|
) |
| |
|
inline |
Sets which color channels can be written to.
- Parameters
-
| red | Should red channel be written to. |
| green | Should green channel be written to. |
| blue | Should blue channel be written to. |
| alpha | Should alpha channel be written to. |
◆ setColorWriteMask() [2/2]
| void gpu::State::setColorWriteMask |
( |
ColorMask |
mask | ) |
|
|
inline |
- Parameters
-
| mask | Bit AND of color channels that are to be written to. |
◆ setSampleMask()
| void gpu::State::setSampleMask |
( |
uint32 |
mask | ) |
|
|
inline |
Sets sample mask. Samples that are written to are decided by bit AND of this mask and given fragment's coverage.
- Parameters
-
| mask | Mask that decides which samples can be written to. |
◆ setStencilTest() [1/2]
| void gpu::State::setStencilTest |
( |
bool |
enabled, |
|
|
uint8 |
frontWriteMask, |
|
|
StencilTest |
frontTest |
|
) |
| |
|
inline |
- Parameters
-
| enabled | Is stencil test enabled. |
| frontWriteMask | Controls which bits are written to in the stencil buffer for both front and back faces. |
| frontTest | Stencil test settings for both front and back faces. |
◆ setStencilTest() [2/2]
| void gpu::State::setStencilTest |
( |
bool |
enabled, |
|
|
uint8 |
frontWriteMask, |
|
|
StencilTest |
frontTest, |
|
|
uint8 |
backWriteMask, |
|
|
StencilTest |
backTest |
|
) |
| |
|
inline |
- Parameters
-
| enabled | Is stencil test enabled. |
| frontWriteMask | Controls which bits are written to in the stencil buffer for front faces. |
| frontTest | Stencil test settings for the front faces. |
| backWriteMask | Controls which bits are written to in the stencil buffer for back faces. |
| backTest | Stencil test settings for the back faces. |
The documentation for this class was generated from the following files: