#[repr(u32)]
pub enum Format {
Show 21 variants
Unknown,
L8,
A8,
Rgba4,
Rgb5a1,
Argb8,
Rgbx8,
Argb82,
R32F,
Rg16F,
Rgba16F,
Rgba32F,
Dxt1,
Dxt3,
Dxt5,
D16,
D24S8,
Rgba8,
Null,
Shadow16,
Shadow24,
}
Available on crate feature
tex
only.Expand description
Pixel format of a texture.
Variants
Unknown
L8
A8
Rgba4
Rgb5a1
Argb8
Rgbx8
Argb82
R32F
Rg16F
Rgba16F
Rgba32F
Dxt1
Dxt3
Dxt5
D16
D24S8
Rgba8
Null
Shadow16
Shadow24
Implementations
sourceimpl Format
impl Format
sourcepub fn kind(&self) -> FormatKind
pub fn kind(&self) -> FormatKind
Texture format kind.
sourcepub fn components(&self) -> u8
pub fn components(&self) -> u8
Channel or component count.
sourcepub fn bits_per_pixel(&self) -> u8
pub fn bits_per_pixel(&self) -> u8
Bits per pixel.
Trait Implementations
sourceimpl BinRead for Format
impl BinRead for Format
sourcefn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_options: &ReadOptions,
__binrw_generated_var_arguments: Self::Args
) -> BinResult<Self>
fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_options: &ReadOptions,
__binrw_generated_var_arguments: Self::Args
) -> BinResult<Self>
impl Copy 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