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 PartialOrd for Kind
impl PartialOrd for Kind
impl Copy for Kind
impl Eq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
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