Enum gfx_core::texture::Kind [−][src]
pub enum Kind {
D1(Size),
D1Array(Size, Layer),
D2(Size, Size, AaMode),
D2Array(Size, Size, Layer, AaMode),
D3(Size, Size, Size),
Cube(Size),
CubeArray(Size, Layer),
}Specifies the kind of a texture storage to be allocated.
Variants
D1(Size)A single row of texels.
D1Array(Size, Layer)An array of rows of texels. Equivalent to Texture2D except that texels in a different row are not sampled.
D2(Size, Size, AaMode)A traditional 2D texture, with rows arranged contiguously.
D2Array(Size, Size, Layer, AaMode)An array of 2D textures. Equivalent to Texture3D except that texels in a different depth level are not sampled.
D3(Size, Size, Size)A volume texture, with each 2D layer arranged contiguously.
Cube(Size)A set of 6 2D textures, one for each face of a cube.
CubeArray(Size, Layer)An array of Cube textures.
Methods
impl Kind[src]
impl Kindpub fn get_dimensions(&self) -> Dimensions[src]
pub fn get_dimensions(&self) -> DimensionsGet texture dimensions, with 0 values where not applicable.
pub fn get_level_dimensions(&self, level: Level) -> Dimensions[src]
pub fn get_level_dimensions(&self, level: Level) -> DimensionsGet the dimensionality of a particular mipmap level.
pub fn get_num_levels(&self) -> Level[src]
pub fn get_num_levels(&self) -> LevelCount the number of mipmap levels.
pub fn get_num_slices(&self) -> Option<Layer>[src]
pub fn get_num_slices(&self) -> Option<Layer>Return the number of slices for an array, or None for non-arrays.
pub fn is_cube(&self) -> bool[src]
pub fn is_cube(&self) -> boolCheck if it's one of the cube kinds.
Trait Implementations
impl Clone for Kind[src]
impl Clone for Kindfn clone(&self) -> Kind[src]
fn clone(&self) -> KindReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Copy for Kind[src]
impl Copy for Kindimpl Debug for Kind[src]
impl Debug for Kindfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for Kind[src]
impl Eq for Kindimpl Hash for Kind[src]
impl Hash for Kindfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Ord for Kind[src]
impl Ord for Kindfn cmp(&self, other: &Kind) -> Ordering[src]
fn cmp(&self, other: &Kind) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl PartialEq for Kind[src]
impl PartialEq for Kindfn eq(&self, other: &Kind) -> bool[src]
fn eq(&self, other: &Kind) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Kind) -> bool[src]
fn ne(&self, other: &Kind) -> boolThis method tests for !=.
impl PartialOrd for Kind[src]
impl PartialOrd for Kindfn partial_cmp(&self, other: &Kind) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Kind) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Kind) -> bool[src]
fn lt(&self, other: &Kind) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Kind) -> bool[src]
fn le(&self, other: &Kind) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Kind) -> bool[src]
fn gt(&self, other: &Kind) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Kind) -> bool[src]
fn ge(&self, other: &Kind) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more