Cogs.Core
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.

Definition at line 8 of file BlendState.h.

Member Enumeration Documentation

◆ Blend

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

Options for blend functions.

Definition at line 13 of file BlendState.h.

◆ BlendOperation

enum struct Cogs::BlendState::BlendOperation : uint8_t
strong

Definition at line 31 of file BlendState.h.

Member Function Documentation

◆ DefaultState()

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

Creates a blend state object initialized with the default settings.

Definition at line 55 of file BlendState.h.

Member Data Documentation

◆ destinationBlend

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

Blend option for the blend destination data.

Definition at line 47 of file BlendState.h.

Referenced by Cogs::RenderTargetsVK::loadBlendState(), Cogs::RenderTargetsGLES30::loadBlendState(), and Cogs::ContextGL20::setBlendState().

◆ enabled

uint8_t Cogs::BlendState::enabled = 0

◆ operation

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

How the two blend values are combined.

Definition at line 50 of file BlendState.h.

Referenced by Cogs::RenderTargetsGLES30::loadBlendState(), and Cogs::ContextGL20::setBlendState().

◆ sourceBlend

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

Blend option for the blend source data.

Definition at line 44 of file BlendState.h.

Referenced by Cogs::RenderTargetsVK::loadBlendState(), Cogs::RenderTargetsGLES30::loadBlendState(), and Cogs::ContextGL20::setBlendState().


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