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]
pub fn get_dimensions(&self) -> Dimensions
[src]
Get texture dimensions, with 0 values where not applicable.
pub fn get_level_dimensions(&self, level: Level) -> Dimensions
[src]
Get the dimensionality of a particular mipmap level.
pub fn get_num_levels(&self) -> Level
[src]
Count the number of mipmap levels.
pub fn get_num_slices(&self) -> Option<Layer>
[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 Clone for Kind
[src]
fn clone(&self) -> Kind
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Kind
[src]
impl Debug for Kind
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Eq for Kind
[src]
impl Hash for Kind
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Ord for Kind
[src]
fn cmp(&self, __arg_0: &Kind) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl PartialEq for Kind
[src]
fn eq(&self, __arg_0: &Kind) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Kind) -> bool
[src]
This method tests for !=
.
impl PartialOrd for Kind
[src]
fn partial_cmp(&self, __arg_0: &Kind) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Kind) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Kind) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Kind) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Kind) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more