[−][src]Enum gfx::texture::Kind
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.
Methods
impl Kind[src]
pub fn get_dimensions(&self) -> (u16, u16, u16, AaMode)[src]
Get texture dimensions, with 0 values where not applicable.
pub fn get_level_dimensions(&self, level: u8) -> (u16, u16, u16, AaMode)[src]
Get the dimensionality of a particular mipmap level.
pub fn get_num_levels(&self) -> u8[src]
Count the number of mipmap levels.
pub fn get_num_slices(&self) -> Option<u16>[src]
Return the number of slices for an array, or None for non-arrays.
pub fn is_cube(&self) -> bool[src]
Check if it's one of the cube kinds.
Trait Implementations
impl Ord for Kind[src]
fn cmp(&self, other: &Kind) -> Ordering[src]
fn max(self, other: Self) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Eq for Kind[src]
impl Clone for Kind[src]
fn clone(&self) -> Kind[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialOrd<Kind> for Kind[src]
fn partial_cmp(&self, other: &Kind) -> Option<Ordering>[src]
fn lt(&self, other: &Kind) -> bool[src]
fn le(&self, other: &Kind) -> bool[src]
fn gt(&self, other: &Kind) -> bool[src]
fn ge(&self, other: &Kind) -> bool[src]
impl Copy for Kind[src]
impl PartialEq<Kind> for Kind[src]
impl Hash for Kind[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher, [src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for Kind[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,