#[repr(transparent)]pub struct SDL_GPUBlendOp(pub c_int);Expand description
Specifies the operator 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_BLENDOP_INVALID | |
ADD | SDL_GPU_BLENDOP_ADD | (source * source_factor) + (destination * destination_factor) |
SUBTRACT | SDL_GPU_BLENDOP_SUBTRACT | (source * source_factor) - (destination * destination_factor) |
REVERSE_SUBTRACT | SDL_GPU_BLENDOP_REVERSE_SUBTRACT | (destination * destination_factor) - (source * source_factor) |
MIN | SDL_GPU_BLENDOP_MIN | min(source, destination) |
MAX | SDL_GPU_BLENDOP_MAX | max(source, destination) |
Tuple Fields§
§0: c_intImplementations§
Source§impl SDL_GPUBlendOp
impl SDL_GPUBlendOp
pub const INVALID: Self
Sourcepub const REVERSE_SUBTRACT: Self
pub const REVERSE_SUBTRACT: Self
(destination * destination_factor) - (source * source_factor)
Trait Implementations§
Source§impl Clone for SDL_GPUBlendOp
impl Clone for SDL_GPUBlendOp
Source§fn clone(&self) -> SDL_GPUBlendOp
fn clone(&self) -> SDL_GPUBlendOp
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_GPUBlendOp
Available on crate feature debug-impls only.
impl Debug for SDL_GPUBlendOp
Available on crate feature
debug-impls only.Source§impl Default for SDL_GPUBlendOp
impl Default for SDL_GPUBlendOp
Source§fn default() -> SDL_GPUBlendOp
fn default() -> SDL_GPUBlendOp
Returns the “default value” for a type. Read more
Source§impl From<SDL_GPUBlendOp> for c_int
impl From<SDL_GPUBlendOp> for c_int
Source§fn from(value: SDL_GPUBlendOp) -> Self
fn from(value: SDL_GPUBlendOp) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_GPUBlendOp
Available on crate feature metadata only.
impl GroupMetadata for SDL_GPUBlendOp
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_GPUBlendOp
impl Hash for SDL_GPUBlendOp
Source§impl Ord for SDL_GPUBlendOp
impl Ord for SDL_GPUBlendOp
Source§fn cmp(&self, other: &SDL_GPUBlendOp) -> Ordering
fn cmp(&self, other: &SDL_GPUBlendOp) -> 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_GPUBlendOp> for c_int
impl PartialEq<SDL_GPUBlendOp> for c_int
Source§impl PartialEq<i32> for SDL_GPUBlendOp
impl PartialEq<i32> for SDL_GPUBlendOp
Source§impl PartialEq for SDL_GPUBlendOp
impl PartialEq for SDL_GPUBlendOp
Source§impl PartialOrd for SDL_GPUBlendOp
impl PartialOrd for SDL_GPUBlendOp
impl Copy for SDL_GPUBlendOp
impl Eq for SDL_GPUBlendOp
impl StructuralPartialEq for SDL_GPUBlendOp
Auto Trait Implementations§
impl Freeze for SDL_GPUBlendOp
impl RefUnwindSafe for SDL_GPUBlendOp
impl Send for SDL_GPUBlendOp
impl Sync for SDL_GPUBlendOp
impl Unpin for SDL_GPUBlendOp
impl UnwindSafe for SDL_GPUBlendOp
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