pub enum Kind {
D1(u16),
D1Array(u16, u16),
D2(u16, u16, AaMode),
D2Array(u16, u16, u16, AaMode),
D3(u16, u16, u16),
Cube(u16),
CubeArray(u16, u16),
}
Expand description
Specifies the kind of a texture storage to be allocated.
Variants§
D1(u16)
A single row of texels.
D1Array(u16, u16)
An array of rows of texels. Equivalent to Texture2D except that texels in a different row are not sampled.
D2(u16, u16, AaMode)
A traditional 2D texture, with rows arranged contiguously.
D2Array(u16, u16, u16, AaMode)
An array of 2D textures. Equivalent to Texture3D except that texels in a different depth level are not sampled.
D3(u16, u16, u16)
A volume texture, with each 2D layer arranged contiguously.
Cube(u16)
A set of 6 2D textures, one for each face of a cube.
CubeArray(u16, u16)
An array of Cube textures.
Implementations§
source§impl Kind
impl Kind
sourcepub fn get_dimensions(&self) -> (u16, u16, u16, AaMode)
pub fn get_dimensions(&self) -> (u16, u16, u16, AaMode)
Get texture dimensions, with 0 values where not applicable.
sourcepub fn get_level_dimensions(&self, level: u8) -> (u16, u16, u16, AaMode)
pub fn get_level_dimensions(&self, level: u8) -> (u16, u16, u16, AaMode)
Get the dimensionality of a particular mipmap level.
sourcepub fn get_num_levels(&self) -> u8
pub fn get_num_levels(&self) -> u8
Count the number of mipmap levels.
sourcepub fn get_num_slices(&self) -> Option<u16>
pub fn get_num_slices(&self) -> Option<u16>
Return the number of slices for an array, or None for non-arrays.
Trait Implementations§
source§impl Ord for Kind
impl Ord for Kind
source§impl PartialEq<Kind> for Kind
impl PartialEq<Kind> for Kind
source§impl PartialOrd<Kind> for Kind
impl PartialOrd<Kind> for Kind
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