MClearOperation Class Reference


Detailed Description

Class which defines the operation of clearing render target channels.

#include <MViewport2Renderer.h>

Inheritance diagram for MClearOperation:
Inheritance graph
[legend]

List of all members.

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.

Member Enumeration Documentation

ClearMask describes the set of channels to clear If the mask value is set then that given channel will be cleared.

Enumerator:
kClearNone 

Clear nothing.

kClearColor 

Clear color.

kClearDepth 

Clear depth.

kClearStencil 

Clear stencil.


Member Function Documentation

unsigned int mask ( ) const

Query the clear mask.

Bit flags can be tested with the MClearOperation::ClearMask enumeration.

Returns:
The clear mask
const float * clearColor ( ) const

Query the first clear color value.

Returns:
Clear color
bool clearGradient ( ) const

Query if the clear should clear with a gradient.

Returns:
Clear gradient flag.
const float * clearColor2 ( ) const

Query the second clear color value.

Returns:
Clear color
int clearStencil ( ) const

Query the stencil clear value.

Returns:
Stencil value
float clearDepth ( ) const

Query the clear depth value.

Returns:
Depth value
void setMask ( unsigned int  mask )

Set the clear mask to define which channels to clear.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[in] value Color value to set
void setClearStencil ( int  value )

Set the clear stencil value.

Parameters:
[in] value Stencil value
void setClearDepth ( float  value )

Set the clear depth value.

Parameters:
[in] value Depth value

MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation
MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation MClearOperation