pub struct GlBlendState { /* private fields */ }Expand description
The blend and color-write state of one draw.
Mirrors the alpha/color pair of BlendState exactly, so the WebGL
path can consume the same blend the WebGPU path builds, but carries
the extra enabled flag WebGL needs: WebGPU expresses “no blend” as
blend: None on the target, whereas WebGL expresses it as leaving
BLEND disabled, which is a different call with a different cost.
Implementations§
Source§impl GlBlendState
impl GlBlendState
pub fn get_enabled(&self) -> &bool
pub fn get_mut_enabled(&mut self) -> &mut bool
pub fn set_enabled(&mut self, val: bool) -> &mut Self
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
Trait Implementations§
Source§impl Clone for GlBlendState
impl Clone for GlBlendState
impl Copy for GlBlendState
Source§impl Debug for GlBlendState
impl Debug for GlBlendState
Source§impl Default for GlBlendState
impl Default for GlBlendState
Source§impl PartialEq for GlBlendState
impl PartialEq for GlBlendState
impl StructuralPartialEq for GlBlendState
Auto Trait Implementations§
impl Freeze for GlBlendState
impl RefUnwindSafe for GlBlendState
impl Send for GlBlendState
impl Sync for GlBlendState
impl Unpin for GlBlendState
impl UnsafeUnpin for GlBlendState
impl UnwindSafe for GlBlendState
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