Kanzi Framework  3.9.0
Kanzi Engine API
kanzi::CompositionRequirements Class Reference

Composition requirements represents the required buffers for composition. More...

#include <kanzi/core.ui/graphics2d/composition_requirements.hpp>

Public Types

enum  CompositionFlags {
  AlphaRequired, DepthRequired, StencilRequired, ColorCleared,
  DepthCleared, StencilCleared, CompositionFlagsBitCount
}
 Distinct flags for composition buffer requirements and buffer clears. More...
 

Public Member Functions

 CompositionRequirements ()
 Constructor. More...
 
 CompositionRequirements (unsigned long mask)
 Constructor with bitmask. More...
 
unsigned long getMask () const
 Gets the unsigned long bitmask representation of the composition requirements. More...
 
bool hasColorClear () const
 Is color clear flag set? More...
 
bool hasDepthClear () const
 Is depth clear flag set? More...
 
bool hasStencilClear () const
 Is stencil clear flag set? More...
 
bool isAlphaRequired () const
 Is alpha channel required. More...
 
bool isDepthRequired () const
 Is depth buffer required. More...
 
bool isStencilRequired () const
 Is stencil buffer required. More...
 
bool operator!= (const CompositionRequirements &other) const
 Not equals operator. More...
 
bool operator== (const CompositionRequirements &other) const
 Equals operator. More...
 
void setAlphaRequired (bool flag)
 Sets alpha channel requirement flag. More...
 
void setColorClear (bool flag)
 Sets the color clear flag. More...
 
void setDepthClear (bool flag)
 Sets the depth clear flag. More...
 
void setDepthRequired (bool flag)
 Sets depth buffer requirement flag. More...
 
void setStencilClear (bool flag)
 Sets the stencil clear flag. More...
 
void setStencilRequired (bool flag)
 Sets stencil buffer requirement flag. More...
 

Detailed Description

Composition requirements represents the required buffers for composition.

CompositionRequirements is used by Node2D and RenderPass classes.

Member Enumeration Documentation

◆ CompositionFlags

Distinct flags for composition buffer requirements and buffer clears.

Enumerator
AlphaRequired 

Alpha buffer requested.

DepthRequired 

Depth buffer requested.

StencilRequired 

Stencil buffer requested.

ColorCleared 

Color buffer cleared.

DepthCleared 

Depth buffer cleared.

StencilCleared 

Stencil buffer cleared.

CompositionFlagsBitCount 

Bit count for the bitset.

Constructor & Destructor Documentation

◆ CompositionRequirements() [1/2]

kanzi::CompositionRequirements::CompositionRequirements ( )
inlineexplicit

Constructor.

◆ CompositionRequirements() [2/2]

kanzi::CompositionRequirements::CompositionRequirements ( unsigned long  mask)
inlineexplicit

Constructor with bitmask.

Parameters
maskMash to use for initialization.

Member Function Documentation

◆ getMask()

unsigned long kanzi::CompositionRequirements::getMask ( ) const
inline

Gets the unsigned long bitmask representation of the composition requirements.

Returns
Bit mask of requirements.

◆ isAlphaRequired()

bool kanzi::CompositionRequirements::isAlphaRequired ( ) const
inline

Is alpha channel required.

Returns
True if flag set, false otherwise.

◆ setAlphaRequired()

void kanzi::CompositionRequirements::setAlphaRequired ( bool  flag)
inline

Sets alpha channel requirement flag.

Parameters
flagNew color clear flag.

◆ isDepthRequired()

bool kanzi::CompositionRequirements::isDepthRequired ( ) const
inline

Is depth buffer required.

Returns
True if flag set, false otherwise.

◆ setDepthRequired()

void kanzi::CompositionRequirements::setDepthRequired ( bool  flag)
inline

Sets depth buffer requirement flag.

Parameters
flagNew color clear flag.

◆ isStencilRequired()

bool kanzi::CompositionRequirements::isStencilRequired ( ) const
inline

Is stencil buffer required.

Returns
True if flag set, false otherwise.

◆ setStencilRequired()

void kanzi::CompositionRequirements::setStencilRequired ( bool  flag)
inline

Sets stencil buffer requirement flag.

Parameters
flagNew color clear flag.

◆ hasColorClear()

bool kanzi::CompositionRequirements::hasColorClear ( ) const
inline

Is color clear flag set?

Returns
True if flag set, false otherwise.

◆ setColorClear()

void kanzi::CompositionRequirements::setColorClear ( bool  flag)
inline

Sets the color clear flag.

Parameters
flagNew color clear flag.

◆ hasDepthClear()

bool kanzi::CompositionRequirements::hasDepthClear ( ) const
inline

Is depth clear flag set?

Returns
True if flag set, false otherwise.

◆ setDepthClear()

void kanzi::CompositionRequirements::setDepthClear ( bool  flag)
inline

Sets the depth clear flag.

Parameters
flagNew color clear flag.

◆ hasStencilClear()

bool kanzi::CompositionRequirements::hasStencilClear ( ) const
inline

Is stencil clear flag set?

Returns
True if flag set, false otherwise.

◆ setStencilClear()

void kanzi::CompositionRequirements::setStencilClear ( bool  flag)
inline

Sets the stencil clear flag.

Parameters
flagNew color clear flag.

◆ operator==()

bool kanzi::CompositionRequirements::operator== ( const CompositionRequirements other) const
inline

Equals operator.

Parameters
otherOther comparison requirements.
Returns
If requirements match, true, otherwise false.

◆ operator!=()

bool kanzi::CompositionRequirements::operator!= ( const CompositionRequirements other) const
inline

Not equals operator.

Parameters
otherOther comparison requirements.
Returns
If requirements do not match, true, otherwise false.

The documentation for this class was generated from the following file: