pub enum ClearColorValue {
Float32([f32; 4]),
Int32([i32; 4]),
Uint32([u32; 4]),
}Expand description
Structure specifying a clear color value.
Variants§
Float32([f32; 4])
Value as f32.
Use this member for color clear values when the format of the image or attachment is one of the numeric formats with a numeric type that is floating-point. Floating-point values are automatically converted to the format of the image, with the clear value being treated as linear if the image is sRGB.
Int32([i32; 4])
Value as i32.
Use this member for color clear values when the format of the image or attachment has a numeric type that is signed integer. Signed integer values are converted to the format of the image by casting to the smaller type (with negative 32-bit values mapping to negative values in the smaller type). If the integer clear value is not representable in the target type (e.g. would overflow in conversion to that type), the clear value is undefined.
Uint32([u32; 4])
Value as u32.
Use this member for color clear values when the format of the image or attachment has a numeric type that is unsigned integer. Unsigned integer values are converted to the format of the image by casting to the integer type with fewer bits.
Implementations§
Source§impl ClearColorValue
impl ClearColorValue
Sourcepub const BLACK_ALPHA_ONE: Self
pub const BLACK_ALPHA_ONE: Self
RGB zeros and alpha ones.
Sourcepub const BLACK_ALPHA_ZERO: Self
pub const BLACK_ALPHA_ZERO: Self
All zeros.
Sourcepub const WHITE_ALPHA_ONE: Self
pub const WHITE_ALPHA_ONE: Self
RGB zeros and alpha ones.
Sourcepub const WHITE_ALPHA_ZERO: Self
pub const WHITE_ALPHA_ZERO: Self
RGB ones and alpha zeros.
Sourcepub const fn rgba(r: f32, g: f32, b: f32, a: f32) -> Self
pub const fn rgba(r: f32, g: f32, b: f32, a: f32) -> Self
Convenience constructor for clear color values.
Trait Implementations§
Source§impl Clone for ClearColorValue
impl Clone for ClearColorValue
Source§fn clone(&self) -> ClearColorValue
fn clone(&self) -> ClearColorValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more