|
Castor3D
..
|
Blending configurations grouping class. More...
Inheritance diagram for Castor3D::BlendState:
Collaboration diagram for Castor3D::BlendState:Classes | |
| struct | stRT_BLEND_STATE |
Public Member Functions | |
| C3D_API | BlendState (Engine &p_engine) |
| Constructor. More... | |
| virtual C3D_API | ~BlendState () |
| Destructor. More... | |
| virtual C3D_API bool | Initialise ()=0 |
| Initialises the states. More... | |
| virtual C3D_API void | Cleanup ()=0 |
| Cleans the states. More... | |
| virtual C3D_API bool | Apply ()=0 |
| Applies the states. More... | |
| bool | IsAlphaToCoverageEnabled () const |
| Retrieves the alpha to coverage activation status. More... | |
| void | EnableAlphaToCoverage (bool p_enable) |
| Sets the alpha to coverage activation status. More... | |
| bool | IsIndependantBlendEnabled () const |
| Retrieves the independant blending activation status. More... | |
| void | EnableIndependantBlend (bool p_enable) |
| Sets the independant blending activation status. More... | |
| const Castor::Colour & | GetBlendFactors () const |
| Retrieves the blend factors. More... | |
| void | SetBlendFactors (const Castor::Colour &p_clFactors) |
| Sets the blend factors. More... | |
| uint32_t | GetSampleCoverageMask () const |
| Retrieves the sample coverage mask. More... | |
| void | SetSampleCoverageMask (uint32_t p_uiMask) |
| Sets the sample coverage mask. More... | |
| bool | IsBlendEnabled (uint8_t p_index=0) const |
| Retrieves the blending activation status. More... | |
| void | EnableBlend (bool p_enable, uint8_t p_index=0) |
| Sets the blending activation status. More... | |
| eBLEND | GetRgbSrcBlend (uint8_t p_index=0) const |
| Retrieves the RGB source blending factor. More... | |
| void | SetRgbSrcBlend (eBLEND p_eValue, uint8_t p_index=0) |
| Sets the RGB source blending factor. More... | |
| eBLEND | GetRgbDstBlend (uint8_t p_index=0) const |
| Retrieves the RGB destination blending factor. More... | |
| void | SetRgbDstBlend (eBLEND p_eValue, uint8_t p_index=0) |
| Sets the RGB destination blending factor. More... | |
| eBLEND_OP | GetRgbBlendOp (uint8_t p_index=0) const |
| Retrieves the RGB blending operation. More... | |
| void | SetRgbBlendOp (eBLEND_OP p_eValue, uint8_t p_index=0) |
| Sets the RGB blending operation. More... | |
| eBLEND | GetAlphaSrcBlend (uint8_t p_index=0) const |
| Retrieves the alpha source blending factor. More... | |
| void | SetAlphaSrcBlend (eBLEND p_eValue, uint8_t p_index=0) |
| Sets the alpha source blending factor. More... | |
| eBLEND | GetAlphaDstBlend (uint8_t p_index=0) const |
| Retrieves the alpha destination blending factor. More... | |
| void | SetAlphaDstBlend (eBLEND p_eValue, uint8_t p_index=0) |
| Sets the alpha destination blending factor. More... | |
| eBLEND_OP | GetAlphaBlendOp (uint8_t p_index=0) const |
| Retrieves the RGB blending operation. More... | |
| void | SetAlphaBlendOp (eBLEND_OP p_value, uint8_t p_index=0) |
| Sets the RGB blending operation. More... | |
| uint8_t | GetWriteMask (uint8_t p_index=0) const |
| Retrieves the render target write mask. More... | |
| void | SetWriteMask (uint8_t p_value, uint8_t p_index=0) |
| Sets the render target write mask. More... | |
| void | SetColourMask (eWRITING_MASK p_r, eWRITING_MASK p_g, eWRITING_MASK p_b, eWRITING_MASK p_a) |
| Defines the colour writing mask. More... | |
| eWRITING_MASK | GetColourMaskR () const |
| Retrieves the red colour component writing mask. More... | |
| eWRITING_MASK | GetColourMaskG () const |
| Retrieves the green colour component writing mask. More... | |
| eWRITING_MASK | GetColourMaskB () const |
| Retrieves the blue colour component writing mask. More... | |
| eWRITING_MASK | GetColourMaskA () const |
| Retrieves the alpha colour component writing mask. More... | |
Protected Member Functions | |
| C3D_API void | CreateCurrent () |
| Creates the state used to save the current state. More... | |
| C3D_API void | DestroyCurrent () |
| Destroys the state used to save the current state. More... | |
| virtual C3D_API BlendStateSPtr | DoCreateCurrent ()=0 |
| Creates the state used to save the current state. More... | |
Protected Attributes | |
| bool | m_changed |
| Tells if the blend state has changed. More... | |
| bool | m_bEnableAlphaToCoverage |
| Tells if the alpha to coveage is enabled. More... | |
| bool | m_bIndependantBlend |
| Tells ifthe independant blend states are activated. More... | |
| Castor::Colour | m_blendFactors |
| Le blend colour. More... | |
| uint32_t | m_uiSampleMask |
| The sample mask. More... | |
| std::array< stRT_BLEND_STATE, 8 > | m_rtStates |
| the blend states More... | |
| eWRITING_MASK | m_eColourMask [4] |
| Colours writing mask. More... | |
| BlendStateSPtr | m_currentState |
| Shared_pointer to the internal global state, to use reference counting for this static member. More... | |
Static Protected Attributes | |
| static BlendStateWPtr | m_wCurrentState |
| The internal global state used to commit only the changed states. More... | |
Blending configurations grouping class.
| C3D_API Castor3D::BlendState::BlendState | ( | Engine & | p_engine | ) |
Constructor.
| [in] | p_engine | The engine. |
|
virtual |
Destructor.
|
pure virtual |
Applies the states.
|
pure virtual |
Cleans the states.
|
protected |
Creates the state used to save the current state.
|
protected |
Destroys the state used to save the current state.
|
protectedpure virtual |
Creates the state used to save the current state.
|
inline |
Sets the alpha to coverage activation status.
| [in] | p_enable | The new value |
References m_bEnableAlphaToCoverage, and m_changed.
|
inline |
Sets the blending activation status.
| [in] | p_enable | The new value |
| [in] | p_index | The value index |
References m_changed, and m_rtStates.
|
inline |
Sets the independant blending activation status.
| [in] | p_enable | The new value |
References m_bIndependantBlend, and m_changed.
|
inline |
Retrieves the RGB blending operation.
| [in] | p_index | The value index |
References m_rtStates.
|
inline |
Retrieves the alpha destination blending factor.
| [in] | p_index | The value index |
References m_rtStates.
|
inline |
Retrieves the alpha source blending factor.
| [in] | p_index | The value index |
References m_rtStates.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Retrieves the RGB blending operation.
| [in] | p_index | The value index |
References m_rtStates.
|
inline |
Retrieves the RGB destination blending factor.
| [in] | p_index | The value index |
References m_rtStates.
|
inline |
Retrieves the RGB source blending factor.
| [in] | p_index | The value index |
References m_rtStates.
|
inline |
|
inline |
Retrieves the render target write mask.
| [in] | p_index | The value index |
References m_rtStates.
|
pure virtual |
Initialises the states.
|
inline |
Retrieves the alpha to coverage activation status.
References m_bEnableAlphaToCoverage.
|
inline |
Retrieves the blending activation status.
| [in] | p_index | The value index |
References m_rtStates.
|
inline |
Retrieves the independant blending activation status.
References m_bIndependantBlend.
|
inline |
Sets the RGB blending operation.
| [in] | p_value | The new value |
| [in] | p_index | The value index |
References m_changed, and m_rtStates.
|
inline |
Sets the alpha destination blending factor.
| [in] | p_eValue | The new value |
| [in] | p_index | The value index |
References m_changed, and m_rtStates.
|
inline |
Sets the alpha source blending factor.
| [in] | p_eValue | The new value |
| [in] | p_index | The value index |
References m_changed, and m_rtStates.
|
inline |
Sets the blend factors.
| [in] | p_clFactors | The new value |
References m_blendFactors, and m_changed.
|
inline |
Defines the colour writing mask.
| [in] | p_r,p_g,p_b,p_a | The mask for each colour component |
References m_changed, and m_eColourMask.
|
inline |
Sets the RGB blending operation.
| [in] | p_eValue | The new value |
| [in] | p_index | The value index |
References m_changed, and m_rtStates.
|
inline |
Sets the RGB destination blending factor.
| [in] | p_eValue | The new value |
| [in] | p_index | The value index |
References m_changed, and m_rtStates.
|
inline |
Sets the RGB source blending factor.
| [in] | p_eValue | The new value |
| [in] | p_index | The value index |
References m_changed, and m_rtStates.
|
inline |
Sets the sample coverage mask.
| [in] | p_uiMask | The new value |
References m_changed, and m_uiSampleMask.
|
inline |
Sets the render target write mask.
| [in] | p_value | The new value |
| [in] | p_index | The value index |
References m_changed, and m_rtStates.
|
protected |
Tells if the alpha to coveage is enabled.
Referenced by EnableAlphaToCoverage(), and IsAlphaToCoverageEnabled().
|
protected |
Tells ifthe independant blend states are activated.
Referenced by EnableIndependantBlend(), and IsIndependantBlendEnabled().
|
protected |
Le blend colour.
Referenced by GetBlendFactors(), and SetBlendFactors().
|
protected |
Tells if the blend state has changed.
Referenced by EnableAlphaToCoverage(), EnableBlend(), EnableIndependantBlend(), SetAlphaBlendOp(), SetAlphaDstBlend(), SetAlphaSrcBlend(), SetBlendFactors(), SetColourMask(), SetRgbBlendOp(), SetRgbDstBlend(), SetRgbSrcBlend(), SetSampleCoverageMask(), and SetWriteMask().
|
protected |
Shared_pointer to the internal global state, to use reference counting for this static member.
|
protected |
Colours writing mask.
Referenced by GetColourMaskA(), GetColourMaskB(), GetColourMaskG(), GetColourMaskR(), and SetColourMask().
|
protected |
the blend states
Referenced by EnableBlend(), GetAlphaBlendOp(), GetAlphaDstBlend(), GetAlphaSrcBlend(), GetRgbBlendOp(), GetRgbDstBlend(), GetRgbSrcBlend(), GetWriteMask(), IsBlendEnabled(), SetAlphaBlendOp(), SetAlphaDstBlend(), SetAlphaSrcBlend(), SetRgbBlendOp(), SetRgbDstBlend(), SetRgbSrcBlend(), and SetWriteMask().
|
protected |
The sample mask.
Referenced by GetSampleCoverageMask(), and SetSampleCoverageMask().
|
staticprotected |
The internal global state used to commit only the changed states.
1.8.15