A clear target pass, during which some targets are cleared.
More...
A clear target pass, during which some targets are cleared.
During this operation, the targets selected are cleared using the settings of the pass.
See TargetOperations::addClearTargetsPass() to use it.
◆ getClearColor()
- Returns
- The color used for clearing the color target.
◆ getColorTargetIndex()
unsigned int nkGraphics::ClearTargetsPass::getColorTargetIndex |
( |
| ) |
const |
- Returns
- In a multi target operations, the index of the color target cleared.
◆ getClearDepthValue()
float nkGraphics::ClearTargetsPass::getClearDepthValue |
( |
| ) |
const |
- Returns
- The depth value used during depth target clearing.
◆ getClearStencilValue()
unsigned char nkGraphics::ClearTargetsPass::getClearStencilValue |
( |
| ) |
const |
- Returns
- The stencil value used during stencil target clearing.
◆ getShouldClearColor()
bool nkGraphics::ClearTargetsPass::getShouldClearColor |
( |
| ) |
const |
- Returns
- Whether the color target should be cleared during the pass (true) or not (false).
◆ getShouldClearDepth()
bool nkGraphics::ClearTargetsPass::getShouldClearDepth |
( |
| ) |
const |
- Returns
- Whether the depth target should be cleared during the pass (true) or not (false).
◆ getShouldClearStencil()
bool nkGraphics::ClearTargetsPass::getShouldClearStencil |
( |
| ) |
const |
- Returns
- Whether the stencil target should be cleared during the pass (true) or not (false).
◆ setClearColor()
void nkGraphics::ClearTargetsPass::setClearColor |
( |
const nkMaths::Vector & |
value | ) |
|
Sets the color to use when clearing a color target.
- Parameters
-
◆ setColorTargetIndex()
void nkGraphics::ClearTargetsPass::setColorTargetIndex |
( |
unsigned int |
value | ) |
|
In a multi target operations, sets the index of the color target that should be cleared.
- Parameters
-
value | The index of the color target to clear. |
◆ setClearDepthValue()
void nkGraphics::ClearTargetsPass::setClearDepthValue |
( |
float |
value | ) |
|
Sets the depth value to use when clearing the depth target.
- Parameters
-
◆ setClearStencilValue()
void nkGraphics::ClearTargetsPass::setClearStencilValue |
( |
unsigned char |
value | ) |
|
Sets the stencil value to use when clearing the stencil target.
- Parameters
-
◆ setShouldClearColor()
void nkGraphics::ClearTargetsPass::setShouldClearColor |
( |
bool |
value | ) |
|
Sets whether the color target should be cleared during the pass.
- Parameters
-
value | If the target should be cleared (true) or not (false). |
◆ setShouldClearDepth()
void nkGraphics::ClearTargetsPass::setShouldClearDepth |
( |
bool |
value | ) |
|
Sets whether the depth target should be cleared during the pass.
- Parameters
-
value | If the target should be cleared (true) or not (false). |
◆ setShouldClearStencil()
void nkGraphics::ClearTargetsPass::setShouldClearStencil |
( |
bool |
value | ) |
|
Sets whether the stencil target should be cleared during the pass.
- Parameters
-
value | If the target should be cleared (true) or not (false). |
◆ exportClassToTree()
virtual void nkGraphics::ClearTargetsPass::exportClassToTree |
( |
nkExport::Node * |
rootNode | ) |
|
|
overridevirtual |
Basic exporting capabilities. The tree will be formatted as :
{
"clearColor" : {0.4, 0.8, 0.6, 1.0},
"colorTargetIndex" : 0,
"clearDepthValue" : 1.0,
"clearStencilValue" : 0,
"shouldClearColor" : true,
"shouldClearDepth" : true,
"shouldClearStencil" : true
}
- Parameters
-
rootNode | The tree to export to. |
Reimplemented from nkGraphics::Pass.
◆ importClassFromTree()
virtual void nkGraphics::ClearTargetsPass::importClassFromTree |
( |
nkExport::Node * |
rootNode | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: