pub struct GlBlendState {
pub enabled: bool,
pub color: BlendComponent,
pub alpha: BlendComponent,
}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.
Fields§
§enabled: boolWhether BLEND is enabled for this draw.
color: BlendComponentThe blend applied to the RGB channels.
alpha: BlendComponentThe blend applied to the alpha channel, which is frequently not the same blend as the color channels.
Implementations§
Source§impl GlBlendState
impl GlBlendState
pub fn get_enabled(&self) -> bool
pub fn get_color(&self) -> &BlendComponent
pub fn get_alpha(&self) -> &BlendComponent
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