Enum gfx::format::SurfaceType
source · pub enum SurfaceType {
Show 24 variants
R4_G4,
R4_G4_B4_A4,
R5_G5_B5_A1,
R5_G6_B5,
R8,
R8_G8,
R8_G8_B8_A8,
R10_G10_B10_A2,
R11_G11_B10,
R16,
R16_G16,
R16_G16_B16,
R16_G16_B16_A16,
R32,
R32_G32,
R32_G32_B32,
R32_G32_B32_A32,
B8_G8_R8_A8,
D16,
D24,
D24_S8,
D32,
BC1_R8_G8_B8,
BC3_R8_G8_B8_A8,
}
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
R4_G4_B4_A4
R5_G5_B5_A1
R5_G6_B5
R8
R8_G8
R8_G8_B8_A8
R10_G10_B10_A2
R11_G11_B10
R16
R16_G16
R16_G16_B16
R16_G16_B16_A16
R32
R32_G32
R32_G32_B32
R32_G32_B32_A32
B8_G8_R8_A8
D16
D24
D24_S8
D32
BC1_R8_G8_B8
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
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 copy 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<SurfaceType> for SurfaceType
impl PartialEq<SurfaceType> for SurfaceType
source§fn eq(&self, other: &SurfaceType) -> bool
fn eq(&self, other: &SurfaceType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SurfaceType> for SurfaceType
impl PartialOrd<SurfaceType> for SurfaceType
source§fn partial_cmp(&self, other: &SurfaceType) -> Option<Ordering>
fn partial_cmp(&self, other: &SurfaceType) -> Option<Ordering>
1.0.0 · source§fn 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 more