Struct wgpu_types::BlendComponent
source · #[repr(C)]pub struct BlendComponent {
pub src_factor: BlendFactor,
pub dst_factor: BlendFactor,
pub operation: BlendOperation,
}
Expand description
Describes a blend component of a BlendState
.
Corresponds to WebGPU GPUBlendComponent
.
Fields§
§src_factor: BlendFactor
Multiplier for the source, which is produced by the fragment shader.
dst_factor: BlendFactor
Multiplier for the destination, which is stored in the target.
operation: BlendOperation
The binary operation applied to the source and destination, multiplied by their respective factors.
Implementations§
source§impl BlendComponent
impl BlendComponent
sourcepub fn uses_constant(&self) -> bool
pub fn uses_constant(&self) -> bool
Returns true if the state relies on the constant color, which is set independently on a render command encoder.
Trait Implementations§
source§impl Clone for BlendComponent
impl Clone for BlendComponent
source§fn clone(&self) -> BlendComponent
fn clone(&self) -> BlendComponent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BlendComponent
impl Debug for BlendComponent
source§impl Default for BlendComponent
impl Default for BlendComponent
source§impl<'de> Deserialize<'de> for BlendComponent
impl<'de> Deserialize<'de> for BlendComponent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for BlendComponent
impl Hash for BlendComponent
source§impl PartialEq for BlendComponent
impl PartialEq for BlendComponent
source§fn eq(&self, other: &BlendComponent) -> bool
fn eq(&self, other: &BlendComponent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BlendComponent
impl Serialize for BlendComponent
impl Copy for BlendComponent
impl Eq for BlendComponent
impl StructuralPartialEq for BlendComponent
Auto Trait Implementations§
impl Freeze for BlendComponent
impl RefUnwindSafe for BlendComponent
impl Send for BlendComponent
impl Sync for BlendComponent
impl Unpin for BlendComponent
impl UnwindSafe for BlendComponent
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)