[−][src]Enum glium::BlendingFunction
Function that the GPU will use for blending.
Variants
Simply overwrite the destination pixel with the source pixel.
The alpha channels are simply ignored. This is the default mode.
For example writing (0.5, 0.9, 0.4, 0.2)
over (0.9, 0.1, 0.4, 0.3)
will
result in (0.5, 0.9, 0.4, 0.2)
.
For each individual component (red, green, blue, and alpha), the minimum value is chosen between the source and the destination.
For example writing (0.5, 0.9, 0.4, 0.2)
over (0.9, 0.1, 0.4, 0.3)
will
result in (0.5, 0.1, 0.4, 0.2)
.
For each individual component (red, green, blue, and alpha), the maximum value is chosen between the source and the destination.
For example writing (0.5, 0.9, 0.4, 0.2)
over (0.9, 0.1, 0.4, 0.3)
will
result in (0.9, 0.9, 0.4, 0.3)
.
For each individual component (red, green, blue, and alpha), a weighted addition between the source and the destination.
The result is equal to source_component * source_factor + dest_component * dest_factor
,
where source_factor
and dest_factor
are the values of source
and destination
of
this enum.
Fields of Addition
source: LinearBlendingFactor
The factor to apply to the source pixel.
destination: LinearBlendingFactor
The factor to apply to the destination pixel.
For each individual component (red, green, blue, and alpha), a weighted subtraction of the source by the destination.
The result is equal to source_component * source_factor - dest_component * dest_factor
,
where source_factor
and dest_factor
are the values of source
and destination
of
this enum.
Fields of Subtraction
source: LinearBlendingFactor
The factor to apply to the source pixel.
destination: LinearBlendingFactor
The factor to apply to the destination pixel.
For each individual component (red, green, blue, and alpha), a weighted subtraction of the destination by the source.
The result is equal to -source_component * source_factor + dest_component * dest_factor
,
where source_factor
and dest_factor
are the values of source
and destination
of
this enum.
Fields of ReverseSubtraction
source: LinearBlendingFactor
The factor to apply to the source pixel.
destination: LinearBlendingFactor
The factor to apply to the destination pixel.
Trait Implementations
impl Clone for BlendingFunction
[src]
fn clone(&self) -> BlendingFunction
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for BlendingFunction
[src]
impl Debug for BlendingFunction
[src]
impl Eq for BlendingFunction
[src]
impl PartialEq<BlendingFunction> for BlendingFunction
[src]
fn eq(&self, other: &BlendingFunction) -> bool
[src]
fn ne(&self, other: &BlendingFunction) -> bool
[src]
impl StructuralEq for BlendingFunction
[src]
impl StructuralPartialEq for BlendingFunction
[src]
Auto Trait Implementations
impl RefUnwindSafe for BlendingFunction
impl Send for BlendingFunction
impl Sync for BlendingFunction
impl Unpin for BlendingFunction
impl UnwindSafe for BlendingFunction
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Content for T where
T: Copy,
[src]
T: Copy,
type Owned = T
A type that holds a sized version of the content.
fn read<F, E>(usize, F) -> Result<T, E> where
F: FnOnce(&mut T) -> Result<(), E>,
[src]
F: FnOnce(&mut T) -> Result<(), E>,
fn get_elements_size() -> usize
[src]
fn to_void_ptr(&Self) -> *const ()
[src]
fn ref_from_ptr(*mut (), usize) -> Option<*mut T>
[src]
fn is_size_suitable(usize) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,