Struct cat_engine_basement::graphics::core::blending::Blending [−][src]
pub struct Blending { /* fields omitted */ }
Expand description
A wrapper for blending functions.
Blending is disabled by default.
The default blending constant colour is [0f32;4]
.
The default blending functions for Source
are BlendingFunction::One
.
The default blending functions for Destination
are BlendingFunction::Zero
.
The default blending equations are BlendingEquation::Addition
.
Implementations
Sets the blending constant colour.
Returns the blending constant colour.
Writes the blending constant colour to colour
.
pub fn set_function(
&self,
sourse_factor: BlendingFunction,
destination_factor: BlendingFunction
)
pub fn set_function(
&self,
sourse_factor: BlendingFunction,
destination_factor: BlendingFunction
)
Sets the blending functions.
pub fn set_function_separate(
&self,
sourse_factor_rgb: BlendingFunction,
destination_factor_rgb: BlendingFunction,
sourse_factor_alpha: BlendingFunction,
destination_factor_alpha: BlendingFunction
)
pub fn set_function_separate(
&self,
sourse_factor_rgb: BlendingFunction,
destination_factor_rgb: BlendingFunction,
sourse_factor_alpha: BlendingFunction,
destination_factor_alpha: BlendingFunction
)
Sets the blending functions for the RBG and Alpha colour components separately.
Returns the source blending function for the RBG colour components.
Writes the source blending function for the RBG colour components to function
.
Returns the source blending function for the Alpha colour component.
Writes the souse blending function for the Alpha colour component to the function
.
Returns the destination blending function for the RBG colour components.
Writes the destination blending function for the RBG colour components to function
.
Returns the destination blending function for the Alpha colour component.
Writes the blending function for the Alpha colour component to function
.
Sets the equation used for both the RGB blending equation and the Alpha blend equation.
pub fn set_equation_separate(
&self,
equation_rgb: BlendingEquation,
equation_alpha: BlendingEquation
)
pub fn set_equation_separate(
&self,
equation_rgb: BlendingEquation,
equation_alpha: BlendingEquation
)
Sets the equation for the RGB blending equation and the Alpha blend equation sepatately.
Returns the RGB blending equation.
Writes the RGB blending equation to equation
.
Returns the Alpha blending equation.
Writes the Alpha blending equation to equation
.