This reference page is linked to from the following overview topics: Rendering Overrides, 3.6 Render Loop Overrides.
Class which defines the operation of clearing render target channels.
#include <MViewport2Renderer.h>
Public Types | |
enum | ClearMask { kClearNone = 0, kClearColor = 1, kClearDepth = 1 << 1, kClearStencil = 1 << 2 } |
ClearMask describes the set of channels to clear If the mask value is set then that given channel will be cleared. More... | |
Public Member Functions | |
unsigned int | mask () const |
Query the clear mask. | |
const float * | clearColor () const |
Query the first clear color value. | |
bool | clearGradient () const |
Query if the clear should clear with a gradient. | |
const float * | clearColor2 () const |
Query the second clear color value. | |
int | clearStencil () const |
Query the stencil clear value. | |
float | clearDepth () const |
Query the clear depth value. | |
void | setMask (unsigned int mask) |
Set the clear mask to define which channels to clear. | |
void | setClearColor (float value[4]) |
Set the clear color value. | |
void | setClearGradient (bool value) |
Set whether to clear with a vertical color gradient. | |
void | setClearColor2 (float value[4]) |
Set the clear second color value. | |
void | setClearStencil (int value) |
Set the clear stencil value. | |
void | setClearDepth (float value) |
Set the clear depth value. |
enum ClearMask |
ClearMask describes the set of channels to clear If the mask value is set then that given channel will be cleared.
unsigned int mask | ( | ) | const |
Query the clear mask.
Bit flags can be tested with the MClearOperation::ClearMask enumeration.
const float * clearColor | ( | ) | const |
bool clearGradient | ( | ) | const |
Query if the clear should clear with a gradient.
const float * clearColor2 | ( | ) | const |
int clearStencil | ( | ) | const |
float clearDepth | ( | ) | const |
void setMask | ( | unsigned int | mask | ) |
Set the clear mask to define which channels to clear.
[in] | mask | Clear mask to set. |
void setClearColor | ( | float | value[4] | ) |
Set the clear color value.
This will be the color used at the top of the gradient if a color gradient is specified.
[in] | value | Color value to set |
void setClearGradient | ( | bool | value | ) |
Set whether to clear with a vertical color gradient.
If a gradient is used then mClearColor is the color at the top of gradient, and mClearColor2 is the color at the bottom of the gradient.
[in] | value | Whether to use a gradient |
void setClearColor2 | ( | float | value[4] | ) |
Set the clear second color value.
Only used when a color gradient is to be used.
[in] | value | Color value to set |
void setClearStencil | ( | int | value | ) |
void setClearDepth | ( | float | value | ) |