Cogs.Rendering
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Public Attributes | List of all members
Cogs::BlendState Struct Reference

Encapsulates blend state for the graphics pipeline in a state object. More...

#include <BlendState.h>

Public Types

enum struct  Blend : uint8_t {
  Zero = 0 , One , SourceColor , InverseSourceColor ,
  SourceAlpha , InverseSourceAlpha , DestinationAlpha , InverseDestinationAlpha ,
  DestinationColor , InverseDestinationColor , SourceAlphaSaturate , BlendFactor ,
  InverseBlendFactor , Count
}
 Options for blend functions. More...
 
enum struct  BlendOperation : uint8_t {
  Add = 0 , Subtract , ReverseSubtract , Min ,
  Max , Count
}
 

Static Public Member Functions

static BlendState DefaultState ()
 Creates a blend state object initialized with the default settings.
 

Public Attributes

uint8_t enabled = 0
 If blending is enabled.
 
Blend sourceBlend = Blend::One
 Blend option for the blend source data.
 
Blend destinationBlend = Blend::Zero
 Blend option for the blend destination data.
 
BlendOperation operation = BlendOperation::Add
 How the two blend values are combined.
 

Detailed Description

Encapsulates blend state for the graphics pipeline in a state object.

Member Enumeration Documentation

◆ Blend

enum struct Cogs::BlendState::Blend : uint8_t
strong

Options for blend functions.

Enumerator
Zero 
One 
SourceColor 
InverseSourceColor 
SourceAlpha 
InverseSourceAlpha 
DestinationAlpha 
InverseDestinationAlpha 
DestinationColor 
InverseDestinationColor 
SourceAlphaSaturate 
BlendFactor 
InverseBlendFactor 
Count 

◆ BlendOperation

enum struct Cogs::BlendState::BlendOperation : uint8_t
strong
Enumerator
Add 
Subtract 
ReverseSubtract 
Min 
Max 
Count 

Member Function Documentation

◆ DefaultState()

static BlendState Cogs::BlendState::DefaultState ( )
inlinestatic

Creates a blend state object initialized with the default settings.

References Add, One, and Zero.

Member Data Documentation

◆ destinationBlend

Blend Cogs::BlendState::destinationBlend = Blend::Zero

Blend option for the blend destination data.

◆ enabled

uint8_t Cogs::BlendState::enabled = 0

If blending is enabled.

◆ operation

BlendOperation Cogs::BlendState::operation = BlendOperation::Add

How the two blend values are combined.

◆ sourceBlend

Blend Cogs::BlendState::sourceBlend = Blend::One

Blend option for the blend source data.


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