#[repr(u8)]pub enum SurfaceType {
Show 24 variants
R4_G4 = 0,
R4_G4_B4_A4 = 1,
R5_G5_B5_A1 = 2,
R5_G6_B5 = 3,
R8 = 4,
R8_G8 = 5,
R8_G8_B8_A8 = 6,
R10_G10_B10_A2 = 7,
R11_G11_B10 = 8,
R16 = 9,
R16_G16 = 10,
R16_G16_B16 = 11,
R16_G16_B16_A16 = 12,
R32 = 13,
R32_G32 = 14,
R32_G32_B32 = 15,
R32_G32_B32_A32 = 16,
B8_G8_R8_A8 = 17,
D16 = 18,
D24 = 19,
D24_S8 = 20,
D32 = 21,
BC1_R8_G8_B8 = 22,
BC3_R8_G8_B8_A8 = 23,
}Expand description
Type of the allocated texture surface. It is supposed to only carry information about the number of bits per each channel. The actual types are up to the views to decide and interpret. The actual components are up to the swizzle to define.
Variants§
R4_G4 = 0
R4_G4_B4_A4 = 1
R5_G5_B5_A1 = 2
R5_G6_B5 = 3
R8 = 4
R8_G8 = 5
R8_G8_B8_A8 = 6
R10_G10_B10_A2 = 7
R11_G11_B10 = 8
R16 = 9
R16_G16 = 10
R16_G16_B16 = 11
R16_G16_B16_A16 = 12
R32 = 13
R32_G32 = 14
R32_G32_B32 = 15
R32_G32_B32_A32 = 16
B8_G8_R8_A8 = 17
D16 = 18
D24 = 19
D24_S8 = 20
D32 = 21
BC1_R8_G8_B8 = 22
Block Compression 1 also known as DXT1, S3TC. See S3TC wiki.
Currently supported in the gfx_device_gl backend only.
BC3_R8_G8_B8_A8 = 23
Block Compression 3 also known as DXT5, S3TC. See S3TC wiki.
Currently supported in the gfx_device_gl backend only.
Implementations§
Source§impl SurfaceType
impl SurfaceType
Sourcepub fn get_total_bits(&self) -> u8
pub fn get_total_bits(&self) -> u8
Return the total number of bits for this format.
Sourcepub fn get_alpha_stencil_bits(&self) -> u8
pub fn get_alpha_stencil_bits(&self) -> u8
Return the number of bits allocated for alpha and stencil.
Trait Implementations§
Source§impl Clone for SurfaceType
impl Clone for SurfaceType
Source§fn clone(&self) -> SurfaceType
fn clone(&self) -> SurfaceType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SurfaceType
impl Debug for SurfaceType
Source§impl Hash for SurfaceType
impl Hash for SurfaceType
Source§impl Ord for SurfaceType
impl Ord for SurfaceType
Source§fn cmp(&self, other: &SurfaceType) -> Ordering
fn cmp(&self, other: &SurfaceType) -> Ordering
1.21.0 · Source§fn 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
Source§impl PartialEq for SurfaceType
impl PartialEq for SurfaceType
Source§impl PartialOrd for SurfaceType
impl PartialOrd for SurfaceType
impl Copy for SurfaceType
impl Eq for SurfaceType
impl StructuralPartialEq for SurfaceType
Auto Trait Implementations§
impl Freeze for SurfaceType
impl RefUnwindSafe for SurfaceType
impl Send for SurfaceType
impl Sync for SurfaceType
impl Unpin for SurfaceType
impl UnwindSafe for SurfaceType
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