pub struct BlendState { /* private fields */ }Expand description
The full blend state of a single color target.
Alpha blending is BlendComponent { operation: Add, source: SourceAlpha, destination: OneMinusSourceAlpha } on both the color and
the alpha channel; replacing the source and keeping the destination is
how a fade-to-black and other multiply blends are expressed.
Implementations§
Source§impl BlendState
Named constructors for the pipeline state structs.
impl BlendState
Named constructors for the pipeline state structs.
Sourcepub fn alpha_over() -> Self
pub fn alpha_over() -> Self
Alpha blending applied identically to the color and the alpha channel, which is what an ordinary translucent surface wants.
§Returns
Self- The assembled blend state.
Source§impl BlendState
impl BlendState
pub fn get_color(&self) -> BlendComponent
pub fn get_mut_color(&mut self) -> &mut BlendComponent
pub fn set_color(&mut self, val: BlendComponent) -> &mut Self
pub fn get_alpha(&self) -> BlendComponent
pub fn get_mut_alpha(&mut self) -> &mut BlendComponent
pub fn set_alpha(&mut self, val: BlendComponent) -> &mut Self
Source§impl BlendState
impl BlendState
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlendState
impl RefUnwindSafe for BlendState
impl Send for BlendState
impl Sync for BlendState
impl Unpin for BlendState
impl UnsafeUnpin for BlendState
impl UnwindSafe for BlendState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more