#[repr(transparent)]pub struct SDL_GPUBlendFactor(pub c_int);Expand description
Specifies a blending factor to be used when pixels in a render target are blended with existing pixels in the texture.
The source color is the value written by the fragment shader. The destination color is the value currently existing in the texture.
§Availability
This enum is available since SDL 3.2.0.
§See also
§Known values (sdl3-sys)
| Associated constant | Global constant | Description |
|---|---|---|
INVALID | SDL_GPU_BLENDFACTOR_INVALID | |
ZERO | SDL_GPU_BLENDFACTOR_ZERO | 0 |
ONE | SDL_GPU_BLENDFACTOR_ONE | 1 |
SRC_COLOR | SDL_GPU_BLENDFACTOR_SRC_COLOR | source color |
ONE_MINUS_SRC_COLOR | SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR | 1 - source color |
DST_COLOR | SDL_GPU_BLENDFACTOR_DST_COLOR | destination color |
ONE_MINUS_DST_COLOR | SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR | 1 - destination color |
SRC_ALPHA | SDL_GPU_BLENDFACTOR_SRC_ALPHA | source alpha |
ONE_MINUS_SRC_ALPHA | SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA | 1 - source alpha |
DST_ALPHA | SDL_GPU_BLENDFACTOR_DST_ALPHA | destination alpha |
ONE_MINUS_DST_ALPHA | SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA | 1 - destination alpha |
CONSTANT_COLOR | SDL_GPU_BLENDFACTOR_CONSTANT_COLOR | blend constant |
ONE_MINUS_CONSTANT_COLOR | SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR | 1 - blend constant |
SRC_ALPHA_SATURATE | SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE | min(source alpha, 1 - destination alpha) |
Tuple Fields§
§0: c_intImplementations§
Source§impl SDL_GPUBlendFactor
impl SDL_GPUBlendFactor
pub const INVALID: Self
Sourcepub const ONE_MINUS_SRC_COLOR: Self
pub const ONE_MINUS_SRC_COLOR: Self
1 - source color
Sourcepub const ONE_MINUS_DST_COLOR: Self
pub const ONE_MINUS_DST_COLOR: Self
1 - destination color
Sourcepub const ONE_MINUS_SRC_ALPHA: Self
pub const ONE_MINUS_SRC_ALPHA: Self
1 - source alpha
Sourcepub const ONE_MINUS_DST_ALPHA: Self
pub const ONE_MINUS_DST_ALPHA: Self
1 - destination alpha
Sourcepub const CONSTANT_COLOR: Self
pub const CONSTANT_COLOR: Self
blend constant
Sourcepub const ONE_MINUS_CONSTANT_COLOR: Self
pub const ONE_MINUS_CONSTANT_COLOR: Self
1 - blend constant
Sourcepub const SRC_ALPHA_SATURATE: Self
pub const SRC_ALPHA_SATURATE: Self
min(source alpha, 1 - destination alpha)
Trait Implementations§
Source§impl Clone for SDL_GPUBlendFactor
impl Clone for SDL_GPUBlendFactor
Source§fn clone(&self) -> SDL_GPUBlendFactor
fn clone(&self) -> SDL_GPUBlendFactor
Returns a duplicate 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 SDL_GPUBlendFactor
Available on crate feature debug-impls only.
impl Debug for SDL_GPUBlendFactor
Available on crate feature
debug-impls only.Source§impl Default for SDL_GPUBlendFactor
impl Default for SDL_GPUBlendFactor
Source§fn default() -> SDL_GPUBlendFactor
fn default() -> SDL_GPUBlendFactor
Returns the “default value” for a type. Read more
Source§impl From<SDL_GPUBlendFactor> for c_int
impl From<SDL_GPUBlendFactor> for c_int
Source§fn from(value: SDL_GPUBlendFactor) -> Self
fn from(value: SDL_GPUBlendFactor) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_GPUBlendFactor
Available on crate feature metadata only.
impl GroupMetadata for SDL_GPUBlendFactor
Available on crate feature
metadata only.Source§const GROUP_METADATA: &'static Group
const GROUP_METADATA: &'static Group
Metadata for this group
Source§impl Hash for SDL_GPUBlendFactor
impl Hash for SDL_GPUBlendFactor
Source§impl Ord for SDL_GPUBlendFactor
impl Ord for SDL_GPUBlendFactor
Source§fn cmp(&self, other: &SDL_GPUBlendFactor) -> Ordering
fn cmp(&self, other: &SDL_GPUBlendFactor) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<SDL_GPUBlendFactor> for c_int
impl PartialEq<SDL_GPUBlendFactor> for c_int
Source§impl PartialEq<i32> for SDL_GPUBlendFactor
impl PartialEq<i32> for SDL_GPUBlendFactor
Source§impl PartialEq for SDL_GPUBlendFactor
impl PartialEq for SDL_GPUBlendFactor
Source§impl PartialOrd for SDL_GPUBlendFactor
impl PartialOrd for SDL_GPUBlendFactor
impl Copy for SDL_GPUBlendFactor
impl Eq for SDL_GPUBlendFactor
impl StructuralPartialEq for SDL_GPUBlendFactor
Auto Trait Implementations§
impl Freeze for SDL_GPUBlendFactor
impl RefUnwindSafe for SDL_GPUBlendFactor
impl Send for SDL_GPUBlendFactor
impl Sync for SDL_GPUBlendFactor
impl Unpin for SDL_GPUBlendFactor
impl UnwindSafe for SDL_GPUBlendFactor
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