#[repr(u32)]
pub enum Format {
Show 184 variants
Rg4Unorm,
Rgba4Unorm,
Bgra4Unorm,
R5g6b5Unorm,
B5g6r5Unorm,
R5g5b5a1Unorm,
B5g5r5a1Unorm,
A1r5g5b5Unorm,
R8Unorm,
R8Inorm,
R8Uscaled,
R8Iscaled,
R8Uint,
R8Int,
R8Srgb,
Rg8Unorm,
Rg8Inorm,
Rg8Uscaled,
Rg8Iscaled,
Rg8Uint,
Rg8Int,
Rg8Srgb,
Rgb8Unorm,
Rgb8Inorm,
Rgb8Uscaled,
Rgb8Iscaled,
Rgb8Uint,
Rgb8Int,
Rgb8Srgb,
Bgr8Unorm,
Bgr8Inorm,
Bgr8Uscaled,
Bgr8Iscaled,
Bgr8Uint,
Bgr8Int,
Bgr8Srgb,
Rgba8Unorm,
Rgba8Inorm,
Rgba8Uscaled,
Rgba8Iscaled,
Rgba8Uint,
Rgba8Int,
Rgba8Srgb,
Bgra8Unorm,
Bgra8Inorm,
Bgra8Uscaled,
Bgra8Iscaled,
Bgra8Uint,
Bgra8Int,
Bgra8Srgb,
Abgr8Unorm,
Abgr8Inorm,
Abgr8Uscaled,
Abgr8Iscaled,
Abgr8Uint,
Abgr8Int,
Abgr8Srgb,
A2r10g10b10Unorm,
A2r10g10b10Inorm,
A2r10g10b10Uscaled,
A2r10g10b10Iscaled,
A2r10g10b10Uint,
A2r10g10b10Int,
A2b10g10r10Unorm,
A2b10g10r10Inorm,
A2b10g10r10Uscaled,
A2b10g10r10Iscaled,
A2b10g10r10Uint,
A2b10g10r10Int,
R16Unorm,
R16Inorm,
R16Uscaled,
R16Iscaled,
R16Uint,
R16Int,
R16Float,
Rg16Unorm,
Rg16Inorm,
Rg16Uscaled,
Rg16Iscaled,
Rg16Uint,
Rg16Int,
Rg16Float,
Rgb16Unorm,
Rgb16Inorm,
Rgb16Uscaled,
Rgb16Iscaled,
Rgb16Uint,
Rgb16Int,
Rgb16Float,
Rgba16Unorm,
Rgba16Inorm,
Rgba16Uscaled,
Rgba16Iscaled,
Rgba16Uint,
Rgba16Int,
Rgba16Float,
R32Uint,
R32Int,
R32Float,
Rg32Uint,
Rg32Int,
Rg32Float,
Rgb32Uint,
Rgb32Int,
Rgb32Float,
Rgba32Uint,
Rgba32Int,
Rgba32Float,
R64Uint,
R64Int,
R64Float,
Rg64Uint,
Rg64Int,
Rg64Float,
Rgb64Uint,
Rgb64Int,
Rgb64Float,
Rgba64Uint,
Rgba64Int,
Rgba64Float,
B10g11r11Ufloat,
E5b9g9r9Ufloat,
D16Unorm,
X8D24Unorm,
D32Float,
S8Uint,
D16UnormS8Uint,
D24UnormS8Uint,
D32FloatS8Uint,
Bc1RgbUnorm,
Bc1RgbSrgb,
Bc1RgbaUnorm,
Bc1RgbaSrgb,
Bc2Unorm,
Bc2Srgb,
Bc3Unorm,
Bc3Srgb,
Bc4Unorm,
Bc4Inorm,
Bc5Unorm,
Bc5Inorm,
Bc6hUfloat,
Bc6hFloat,
Bc7Unorm,
Bc7Srgb,
Etc2R8g8b8Unorm,
Etc2R8g8b8Srgb,
Etc2R8g8b8a1Unorm,
Etc2R8g8b8a1Srgb,
Etc2R8g8b8a8Unorm,
Etc2R8g8b8a8Srgb,
EacR11Unorm,
EacR11Inorm,
EacR11g11Unorm,
EacR11g11Inorm,
Astc4x4Unorm,
Astc4x4Srgb,
Astc5x4Unorm,
Astc5x4Srgb,
Astc5x5Unorm,
Astc5x5Srgb,
Astc6x5Unorm,
Astc6x5Srgb,
Astc6x6Unorm,
Astc6x6Srgb,
Astc8x5Unorm,
Astc8x5Srgb,
Astc8x6Unorm,
Astc8x6Srgb,
Astc8x8Unorm,
Astc8x8Srgb,
Astc10x5Unorm,
Astc10x5Srgb,
Astc10x6Unorm,
Astc10x6Srgb,
Astc10x8Unorm,
Astc10x8Srgb,
Astc10x10Unorm,
Astc10x10Srgb,
Astc12x10Unorm,
Astc12x10Srgb,
Astc12x12Unorm,
Astc12x12Srgb,
// some variants omitted
}
Expand description
A format descriptor that describes the channels present in a texture or view, how they are laid out, what size they are, and how the elements of the channels are interpreted (integer, float, etc.)
Variants
Rg4Unorm
Rgba4Unorm
Bgra4Unorm
R5g6b5Unorm
B5g6r5Unorm
R5g5b5a1Unorm
B5g5r5a1Unorm
A1r5g5b5Unorm
R8Unorm
R8Inorm
R8Uscaled
R8Iscaled
R8Uint
R8Int
R8Srgb
Rg8Unorm
Rg8Inorm
Rg8Uscaled
Rg8Iscaled
Rg8Uint
Rg8Int
Rg8Srgb
Rgb8Unorm
Rgb8Inorm
Rgb8Uscaled
Rgb8Iscaled
Rgb8Uint
Rgb8Int
Rgb8Srgb
Bgr8Unorm
Bgr8Inorm
Bgr8Uscaled
Bgr8Iscaled
Bgr8Uint
Bgr8Int
Bgr8Srgb
Rgba8Unorm
Rgba8Inorm
Rgba8Uscaled
Rgba8Iscaled
Rgba8Uint
Rgba8Int
Rgba8Srgb
Bgra8Unorm
Bgra8Inorm
Bgra8Uscaled
Bgra8Iscaled
Bgra8Uint
Bgra8Int
Bgra8Srgb
Abgr8Unorm
Abgr8Inorm
Abgr8Uscaled
Abgr8Iscaled
Abgr8Uint
Abgr8Int
Abgr8Srgb
A2r10g10b10Unorm
A2r10g10b10Inorm
A2r10g10b10Uscaled
A2r10g10b10Iscaled
A2r10g10b10Uint
A2r10g10b10Int
A2b10g10r10Unorm
A2b10g10r10Inorm
A2b10g10r10Uscaled
A2b10g10r10Iscaled
A2b10g10r10Uint
A2b10g10r10Int
R16Unorm
R16Inorm
R16Uscaled
R16Iscaled
R16Uint
R16Int
R16Float
Rg16Unorm
Rg16Inorm
Rg16Uscaled
Rg16Iscaled
Rg16Uint
Rg16Int
Rg16Float
Rgb16Unorm
Rgb16Inorm
Rgb16Uscaled
Rgb16Iscaled
Rgb16Uint
Rgb16Int
Rgb16Float
Rgba16Unorm
Rgba16Inorm
Rgba16Uscaled
Rgba16Iscaled
Rgba16Uint
Rgba16Int
Rgba16Float
R32Uint
R32Int
R32Float
Rg32Uint
Rg32Int
Rg32Float
Rgb32Uint
Rgb32Int
Rgb32Float
Rgba32Uint
Rgba32Int
Rgba32Float
R64Uint
R64Int
R64Float
Rg64Uint
Rg64Int
Rg64Float
Rgb64Uint
Rgb64Int
Rgb64Float
Rgba64Uint
Rgba64Int
Rgba64Float
B10g11r11Ufloat
E5b9g9r9Ufloat
D16Unorm
X8D24Unorm
D32Float
S8Uint
D16UnormS8Uint
D24UnormS8Uint
D32FloatS8Uint
Bc1RgbUnorm
Bc1RgbSrgb
Bc1RgbaUnorm
Bc1RgbaSrgb
Bc2Unorm
Bc2Srgb
Bc3Unorm
Bc3Srgb
Bc4Unorm
Bc4Inorm
Bc5Unorm
Bc5Inorm
Bc6hUfloat
Bc6hFloat
Bc7Unorm
Bc7Srgb
Etc2R8g8b8Unorm
Etc2R8g8b8Srgb
Etc2R8g8b8a1Unorm
Etc2R8g8b8a1Srgb
Etc2R8g8b8a8Unorm
Etc2R8g8b8a8Srgb
EacR11Unorm
EacR11Inorm
EacR11g11Unorm
EacR11g11Inorm
Astc4x4Unorm
Astc4x4Srgb
Astc5x4Unorm
Astc5x4Srgb
Astc5x5Unorm
Astc5x5Srgb
Astc6x5Unorm
Astc6x5Srgb
Astc6x6Unorm
Astc6x6Srgb
Astc8x5Unorm
Astc8x5Srgb
Astc8x6Unorm
Astc8x6Srgb
Astc8x8Unorm
Astc8x8Srgb
Astc10x5Unorm
Astc10x5Srgb
Astc10x6Unorm
Astc10x6Srgb
Astc10x8Unorm
Astc10x8Srgb
Astc10x10Unorm
Astc10x10Srgb
Astc12x10Unorm
Astc12x10Srgb
Astc12x12Unorm
Astc12x12Srgb
Implementations
sourceimpl Format
impl Format
sourcepub fn base_format(self) -> BaseFormat
pub fn base_format(self) -> BaseFormat
Get base format.
Returns None
if format is Undefined
.
sourcepub fn surface_desc(&self) -> FormatDesc
pub fn surface_desc(&self) -> FormatDesc
A shortcut to obtain surface format description.
sourcepub fn is_stencil(self) -> bool
pub fn is_stencil(self) -> bool
Returns if the format has a stencil aspect.
Trait Implementations
sourceimpl Ord for Format
impl Ord for Format
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Format> for Format
impl PartialOrd<Format> for Format
sourcefn partial_cmp(&self, other: &Format) -> Option<Ordering>
fn partial_cmp(&self, other: &Format) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Format
impl Eq for Format
impl StructuralEq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more