Struct glium::draw_parameters::Blend [] [src]

pub struct Blend {
    pub color: BlendingFunction,
    pub alpha: BlendingFunction,
    pub constant_value: (f32, f32, f32, f32),
}

Blend effect that the GPU will use for blending.

Blending happens at the end of the rendering process, when the GPU wants to write the pixels over pixels that already exist in the framebuffer. The blending function allows you to choose how it should merge the two.

If you want to add transparent objects one over another, use Blend::alpha_blending().

Fields

color

The blending function for color channels.

alpha

The blending function for alpha channels.

constant_value

A constant color that can be used in the blending functions.

Methods

impl Blend

fn alpha_blending() -> Blend

Returns a blend effect to add transparent objects over others.

Trait Implementations

impl Default for Blend

fn default() -> Blend

Derived Implementations

impl PartialEq for Blend

fn eq(&self, __arg_0: &Blend) -> bool

fn ne(&self, __arg_0: &Blend) -> bool

impl Debug for Blend

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for Blend

fn clone(&self) -> Blend

fn clone_from(&mut self, source: &Self)

impl Copy for Blend