Enum gfx::texture::Kind
[−]
[src]
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), }
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]
fn get_dimensions(&self) -> (u16, u16, u16, AaMode)
[src]
Get texture dimensions, with 0 values where not applicable.
fn get_level_dimensions(&self, level: u8) -> (u16, u16, u16, AaMode)
[src]
Get the dimensionality of a particular mipmap level.
fn get_num_levels(&self) -> u8
[src]
Count the number of mipmap levels.
fn get_num_slices(&self) -> Option<u16>
[src]
Return the number of slices for an array, or None for non-arrays.
fn is_cube(&self) -> bool
[src]
Check if it's one of the cube kinds.
Trait Implementations
impl Ord for Kind
[src]
impl Copy for Kind
[src]
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 PartialOrd<Kind> for Kind
[src]
fn partial_cmp(&self, __arg_0: &Kind) -> Option<Ordering>
[src]
fn lt(&self, __arg_0: &Kind) -> bool
[src]
fn le(&self, __arg_0: &Kind) -> bool
[src]
fn gt(&self, __arg_0: &Kind) -> bool
[src]
fn ge(&self, __arg_0: &Kind) -> bool
[src]
impl Hash for Kind
[src]
fn hash<__H>(&self, __arg_0: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
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 PartialEq<Kind> 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 Debug for Kind
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.