#[repr(u32)]pub enum Format {
Show 21 variants
Unknown = 0,
L8 = 4_400,
A8 = 4_401,
Rgba4 = 5_184,
Rgb5a1 = 5_185,
Argb8 = 5_200,
Rgbx8 = 5_201,
Argb82 = 5_202,
R32F = 8_528,
Rg16F = 8_784,
Rgba16F = 9_312,
Rgba32F = 9_328,
Dxt1 = 13_344,
Dxt3 = 13_360,
Dxt5 = 13_361,
D16 = 16_704,
D24S8 = 16_976,
Rgba8 = 17_409,
Null = 20_736,
Shadow16 = 20_800,
Shadow24 = 20_816,
}
Available on crate feature
tex
only.Expand description
Pixel format of a texture.
Variants§
Unknown = 0
L8 = 4_400
A8 = 4_401
Rgba4 = 5_184
Rgb5a1 = 5_185
Argb8 = 5_200
Rgbx8 = 5_201
Argb82 = 5_202
R32F = 8_528
Rg16F = 8_784
Rgba16F = 9_312
Rgba32F = 9_328
Dxt1 = 13_344
Dxt3 = 13_360
Dxt5 = 13_361
D16 = 16_704
D24S8 = 16_976
Rgba8 = 17_409
Null = 20_736
Shadow16 = 20_800
Shadow24 = 20_816
Implementations§
Source§impl 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§
Source§impl BinRead for Format
impl BinRead for Format
Source§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>
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>
Read
Self
from the reader using the given ReadOptions
and
arguments.Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments.impl Copy 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> 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