Struct Format

Source
pub struct Format(/* private fields */);
Expand description

Texture data format.

Implementations§

Source§

impl Format

Source

pub fn is_valid(&self) -> bool

Evaluate whether a format value is value or not.

Source

pub fn is_compressed(&self) -> bool

Evaluate whether a format is compressed with an S3TC algorithm.

Source

pub fn is_s3tc_compressed(&self) -> bool

Evaluate whether a format is compressed with an S3TC algorithm.

Source

pub fn is_srgb(&self) -> bool

Evaluate whether a format stores sRGB color space values.

Source

pub fn is_unsigned(&self) -> bool

Evaluate whether a format is unsigned.

Source

pub fn is_signed(&self) -> bool

Evaluate whether a format is signed.

Source

pub fn is_integer(&self) -> bool

Evaluate whether the format is an integer format.

Source

pub fn is_signed_integer(&self) -> bool

Evaluate whether the format is a signed integer format.

Source

pub fn is_unsigned_integer(&self) -> bool

Evaluate whether the format is an unsigned integer format.

Source

pub fn is_float(&self) -> bool

Evaluate whether the format is an float format.

Source

pub fn is_normalized(&self) -> bool

Evaluate whether the format is normalized.

Source

pub fn is_unorm(&self) -> bool

Evaluate whether the format is an unsigned normalized format.

Source

pub fn is_snorm(&self) -> bool

Evaluate whether the format is a signed normalized format.

Source

pub fn is_packed(&self) -> bool

Evaluate whether the format is packed.

Source

pub fn is_depth(&self) -> bool

Evaluate whether the format is a depth format.

Source

pub fn is_stencil(&self) -> bool

Evaluate whether the format has a stencil component.

Source

pub fn is_depth_stencil(&self) -> bool

Evaluate whether the format has depth and stencil components.

Source§

impl Format

Source

pub const UNDEFINED: Format

Source

pub const FIRST: Format

Source

pub const RG4_UNORM_PACK8: Format

Source

pub const RGBA4_UNORM_PACK16: Format

Source

pub const BGRA4_UNORM_PACK16: Format

Source

pub const R5G6B5_UNORM_PACK16: Format

Source

pub const B5G6R5_UNORM_PACK16: Format

Source

pub const RGB5A1_UNORM_PACK16: Format

Source

pub const BGR5A1_UNORM_PACK16: Format

Source

pub const A1RGB5_UNORM_PACK16: Format

Source

pub const R8_UNORM_PACK8: Format

Source

pub const R8_SNORM_PACK8: Format

Source

pub const R8_USCALED_PACK8: Format

Source

pub const R8_SSCALED_PACK8: Format

Source

pub const R8_UINT_PACK8: Format

Source

pub const R8_SINT_PACK8: Format

Source

pub const R8_SRGB_PACK8: Format

Source

pub const RG8_UNORM_PACK8: Format

Source

pub const RG8_SNORM_PACK8: Format

Source

pub const RG8_USCALED_PACK8: Format

Source

pub const RG8_SSCALED_PACK8: Format

Source

pub const RG8_UINT_PACK8: Format

Source

pub const RG8_SINT_PACK8: Format

Source

pub const RG8_SRGB_PACK8: Format

Source

pub const RGB8_UNORM_PACK8: Format

Source

pub const RGB8_SNORM_PACK8: Format

Source

pub const RGB8_USCALED_PACK8: Format

Source

pub const RGB8_SSCALED_PACK8: Format

Source

pub const RGB8_UINT_PACK8: Format

Source

pub const RGB8_SINT_PACK8: Format

Source

pub const RGB8_SRGB_PACK8: Format

Source

pub const BGR8_UNORM_PACK8: Format

Source

pub const BGR8_SNORM_PACK8: Format

Source

pub const BGR8_USCALED_PACK8: Format

Source

pub const BGR8_SSCALED_PACK8: Format

Source

pub const BGR8_UINT_PACK8: Format

Source

pub const BGR8_SINT_PACK8: Format

Source

pub const BGR8_SRGB_PACK8: Format

Source

pub const RGBA8_UNORM_PACK8: Format

Source

pub const RGBA8_SNORM_PACK8: Format

Source

pub const RGBA8_USCALED_PACK8: Format

Source

pub const RGBA8_SSCALED_PACK8: Format

Source

pub const RGBA8_UINT_PACK8: Format

Source

pub const RGBA8_SINT_PACK8: Format

Source

pub const RGBA8_SRGB_PACK8: Format

Source

pub const BGRA8_UNORM_PACK8: Format

Source

pub const BGRA8_SNORM_PACK8: Format

Source

pub const BGRA8_USCALED_PACK8: Format

Source

pub const BGRA8_SSCALED_PACK8: Format

Source

pub const BGRA8_UINT_PACK8: Format

Source

pub const BGRA8_SINT_PACK8: Format

Source

pub const BGRA8_SRGB_PACK8: Format

Source

pub const RGBA8_UNORM_PACK32: Format

Source

pub const RGBA8_SNORM_PACK32: Format

Source

pub const RGBA8_USCALED_PACK32: Format

Source

pub const RGBA8_SSCALED_PACK32: Format

Source

pub const RGBA8_UINT_PACK32: Format

Source

pub const RGBA8_SINT_PACK32: Format

Source

pub const RGBA8_SRGB_PACK32: Format

Source

pub const RGB10A2_UNORM_PACK32: Format

Source

pub const RGB10A2_SNORM_PACK32: Format

Source

pub const RGB10A2_USCALED_PACK32: Format

Source

pub const RGB10A2_SSCALED_PACK32: Format

Source

pub const RGB10A2_UINT_PACK32: Format

Source

pub const RGB10A2_SINT_PACK32: Format

Source

pub const BGR10A2_UNORM_PACK32: Format

Source

pub const BGR10A2_SNORM_PACK32: Format

Source

pub const BGR10A2_USCALED_PACK32: Format

Source

pub const BGR10A2_SSCALED_PACK32: Format

Source

pub const BGR10A2_UINT_PACK32: Format

Source

pub const BGR10A2_SINT_PACK32: Format

Source

pub const R16_UNORM_PACK16: Format

Source

pub const R16_SNORM_PACK16: Format

Source

pub const R16_USCALED_PACK16: Format

Source

pub const R16_SSCALED_PACK16: Format

Source

pub const R16_UINT_PACK16: Format

Source

pub const R16_SINT_PACK16: Format

Source

pub const R16_SFLOAT_PACK16: Format

Source

pub const RG16_UNORM_PACK16: Format

Source

pub const RG16_SNORM_PACK16: Format

Source

pub const RG16_USCALED_PACK16: Format

Source

pub const RG16_SSCALED_PACK16: Format

Source

pub const RG16_UINT_PACK16: Format

Source

pub const RG16_SINT_PACK16: Format

Source

pub const RG16_SFLOAT_PACK16: Format

Source

pub const RGB16_UNORM_PACK16: Format

Source

pub const RGB16_SNORM_PACK16: Format

Source

pub const RGB16_USCALED_PACK16: Format

Source

pub const RGB16_SSCALED_PACK16: Format

Source

pub const RGB16_UINT_PACK16: Format

Source

pub const RGB16_SINT_PACK16: Format

Source

pub const RGB16_SFLOAT_PACK16: Format

Source

pub const RGBA16_UNORM_PACK16: Format

Source

pub const RGBA16_SNORM_PACK16: Format

Source

pub const RGBA16_USCALED_PACK16: Format

Source

pub const RGBA16_SSCALED_PACK16: Format

Source

pub const RGBA16_UINT_PACK16: Format

Source

pub const RGBA16_SINT_PACK16: Format

Source

pub const RGBA16_SFLOAT_PACK16: Format

Source

pub const R32_UINT_PACK32: Format

Source

pub const R32_SINT_PACK32: Format

Source

pub const R32_SFLOAT_PACK32: Format

Source

pub const RG32_UINT_PACK32: Format

Source

pub const RG32_SINT_PACK32: Format

Source

pub const RG32_SFLOAT_PACK32: Format

Source

pub const RGB32_UINT_PACK32: Format

Source

pub const RGB32_SINT_PACK32: Format

Source

pub const RGB32_SFLOAT_PACK32: Format

Source

pub const RGBA32_UINT_PACK32: Format

Source

pub const RGBA32_SINT_PACK32: Format

Source

pub const RGBA32_SFLOAT_PACK32: Format

Source

pub const R64_UINT_PACK64: Format

Source

pub const R64_SINT_PACK64: Format

Source

pub const R64_SFLOAT_PACK64: Format

Source

pub const RG64_UINT_PACK64: Format

Source

pub const RG64_SINT_PACK64: Format

Source

pub const RG64_SFLOAT_PACK64: Format

Source

pub const RGB64_UINT_PACK64: Format

Source

pub const RGB64_SINT_PACK64: Format

Source

pub const RGB64_SFLOAT_PACK64: Format

Source

pub const RGBA64_UINT_PACK64: Format

Source

pub const RGBA64_SINT_PACK64: Format

Source

pub const RGBA64_SFLOAT_PACK64: Format

Source

pub const RG11B10_UFLOAT_PACK32: Format

Source

pub const RGB9E5_UFLOAT_PACK32: Format

Source

pub const D16_UNORM_PACK16: Format

Source

pub const D24_UNORM_PACK32: Format

Source

pub const D32_SFLOAT_PACK32: Format

Source

pub const S8_UINT_PACK8: Format

Source

pub const D16_UNORM_S8_UINT_PACK32: Format

Source

pub const D24_UNORM_S8_UINT_PACK32: Format

Source

pub const D32_SFLOAT_S8_UINT_PACK64: Format

Source

pub const RGB_DXT1_UNORM_BLOCK8: Format

Source

pub const RGB_DXT1_SRGB_BLOCK8: Format

Source

pub const RGBA_DXT1_UNORM_BLOCK8: Format

Source

pub const RGBA_DXT1_SRGB_BLOCK8: Format

Source

pub const RGBA_DXT3_UNORM_BLOCK16: Format

Source

pub const RGBA_DXT3_SRGB_BLOCK16: Format

Source

pub const RGBA_DXT5_UNORM_BLOCK16: Format

Source

pub const RGBA_DXT5_SRGB_BLOCK16: Format

Source

pub const R_ATI1N_UNORM_BLOCK8: Format

Source

pub const R_ATI1N_SNORM_BLOCK8: Format

Source

pub const RG_ATI2N_UNORM_BLOCK16: Format

Source

pub const RG_ATI2N_SNORM_BLOCK16: Format

Source

pub const RGB_BP_UFLOAT_BLOCK16: Format

Source

pub const RGB_BP_SFLOAT_BLOCK16: Format

Source

pub const RGBA_BP_UNORM_BLOCK16: Format

Source

pub const RGBA_BP_SRGB_BLOCK16: Format

Source

pub const RGB_ETC2_UNORM_BLOCK8: Format

Source

pub const RGB_ETC2_SRGB_BLOCK8: Format

Source

pub const RGBA_ETC2_UNORM_BLOCK8: Format

Source

pub const RGBA_ETC2_SRGB_BLOCK8: Format

Source

pub const RGBA_ETC2_UNORM_BLOCK16: Format

Source

pub const RGBA_ETC2_SRGB_BLOCK16: Format

Source

pub const R_EAC_UNORM_BLOCK8: Format

Source

pub const R_EAC_SNORM_BLOCK8: Format

Source

pub const RG_EAC_UNORM_BLOCK16: Format

Source

pub const RG_EAC_SNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_4X4_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_4X4_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_5X4_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_5X4_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_5X5_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_5X5_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_6X5_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_6X5_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_6X6_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_6X6_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_8X5_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_8X5_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_8X6_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_8X6_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_8X8_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_8X8_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_10X5_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_10X5_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_10X6_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_10X6_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_10X8_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_10X8_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_10X10_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_10X10_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_12X10_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_12X10_SRGB_BLOCK16: Format

Source

pub const RGBA_ASTC_12X12_UNORM_BLOCK16: Format

Source

pub const RGBA_ASTC_12X12_SRGB_BLOCK16: Format

Source

pub const RGB_PVRTC1_8X8_UNORM_BLOCK32: Format

Source

pub const RGB_PVRTC1_8X8_SRGB_BLOCK32: Format

Source

pub const RGB_PVRTC1_16X8_UNORM_BLOCK32: Format

Source

pub const RGB_PVRTC1_16X8_SRGB_BLOCK32: Format

Source

pub const RGBA_PVRTC1_8X8_UNORM_BLOCK32: Format

Source

pub const RGBA_PVRTC1_8X8_SRGB_BLOCK32: Format

Source

pub const RGBA_PVRTC1_16X8_UNORM_BLOCK32: Format

Source

pub const RGBA_PVRTC1_16X8_SRGB_BLOCK32: Format

Source

pub const RGBA_PVRTC2_4X4_UNORM_BLOCK8: Format

Source

pub const RGBA_PVRTC2_4X4_SRGB_BLOCK8: Format

Source

pub const RGBA_PVRTC2_8X4_UNORM_BLOCK8: Format

Source

pub const RGBA_PVRTC2_8X4_SRGB_BLOCK8: Format

Source

pub const RGB_ETC_UNORM_BLOCK8: Format

Source

pub const RGB_ATC_UNORM_BLOCK8: Format

Source

pub const RGBA_ATCA_UNORM_BLOCK16: Format

Source

pub const RGBA_ATCI_UNORM_BLOCK16: Format

Source

pub const L8_UNORM_PACK8: Format

Source

pub const A8_UNORM_PACK8: Format

Source

pub const LA8_UNORM_PACK8: Format

Source

pub const L16_UNORM_PACK16: Format

Source

pub const A16_UNORM_PACK16: Format

Source

pub const LA16_UNORM_PACK16: Format

Source

pub const BGR8_UNORM_PACK32: Format

Source

pub const BGR8_SRGB_PACK32: Format

Source

pub const RG3B2_UNORM_PACK8: Format

Source

pub const LAST: Format

Trait Implementations§

Source§

impl Clone for Format

Source§

fn clone(&self) -> Format

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Format

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Format

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Format

Source§

fn eq(&self, other: &Format) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Format

Source§

impl StructuralPartialEq for Format

Auto Trait Implementations§

§

impl Freeze for Format

§

impl RefUnwindSafe for Format

§

impl Send for Format

§

impl Sync for Format

§

impl Unpin for Format

§

impl UnwindSafe for Format

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.