Ritchie's Abstractions 0.2
Platform abstractions that make Toolbox work
Loading...
Searching...
No Matches
BlendState Struct Reference

Structure defining how the GPU should perform blending when outputting pixels onto a surface. More...

Inheritance diagram for BlendState:

Public Member Functions

override bool Equals ([NotNullWhen(true)] object? obj)
 
override int GetHashCode ()
 
override string ToString ()
 
bool Equals (BlendState other)
 

Static Public Member Functions

static bool operator== (BlendState a, BlendState b)
 Checks if two BlendState values are considered equal.
 
static bool operator!= (BlendState a, BlendState b)
 Checks if two BlendState values are not equal.
 

Public Attributes

string Name
 The name of the

See also
BlendState

value. Used for debugging.

 
bool EnableBlending
 Indicates whether blending is enabled.
 
BlendFactor SourceBlend
 When blending is enabled, indicates how the source image is factored into the blended image.
 
BlendFactor DestinationBlend
 When blending is enabled, indicates how the destination image is factored into the blended image.
 
BlendFunction BlendFunction
 When blending is enabled, indicates how the source image and destination image are blended together.
 

Static Public Attributes

static readonly BlendState None
 A

See also
BlendState

value indicating that no blending should occur.

 
static readonly BlendState AlphaBlend
 A BlendState value indicating that alpha blending should occur.
 

Detailed Description

Structure defining how the GPU should perform blending when outputting pixels onto a surface.

Member Function Documentation

◆ operator!=()

static bool operator!= ( BlendState a,
BlendState b )
inlinestatic

Checks if two BlendState values are not equal.

Parameters
aLeft side of the operation
bRight side of the operation
Returns
False if equal, true otherwise

◆ operator==()

static bool operator== ( BlendState a,
BlendState b )
inlinestatic

Checks if two BlendState values are considered equal.

Parameters
aLeft side of the operation
bRight side of the operation
Returns
True if equal, false otherwise

Member Data Documentation

◆ AlphaBlend

readonly BlendState AlphaBlend
static
Initial value:
{
Name = "AlphaBlend",
SourceBlend = BlendFactor.SourceAlpha,
}
BlendFactor
Definition BlendFactor.cs:8
@ OneMinusSourceAlpha
Invert the source image's alpha channel, and use that.
Definition BlendFactor.cs:47
Structure defining how the GPU should perform blending when outputting pixels onto a surface.
Definition BlendState.cs:9
bool EnableBlending
Indicates whether blending is enabled.
Definition BlendState.cs:18
BlendFactor SourceBlend
When blending is enabled, indicates how the source image is factored into the blended image.
Definition BlendState.cs:23
BlendFactor DestinationBlend
When blending is enabled, indicates how the destination image is factored into the blended image.
Definition BlendState.cs:28
string Name
The name of the BlendStatevalue. Used for debugging.
Definition BlendState.cs:13

A BlendState value indicating that alpha blending should occur.

◆ None

readonly BlendState None
static
Initial value:
{
Name = "None",
EnableBlending = false,
}
@ Zero
Use a constant value of zero.
Definition BlendFactor.cs:12

A

See also
BlendState

value indicating that no blending should occur.


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