Enum gfx::tex::Kind []

pub enum Kind {
    D1(u16),
    D1Array(u16u16),
    D2(u16u16AaMode),
    D2Array(u16u16u16AaMode),
    D3(u16u16u16),
    Cube(u16),
    CubeArray(u16u16),
}

Specifies the kind of a texture storage to be allocated.

Variants

D1(u16)

A single row of texels.

D1Array(u16u16)

An array of rows of texels. Equivalent to Texture2D except that texels in a different row are not sampled.

D2(u16u16AaMode)

A traditional 2D texture, with rows arranged contiguously.

D2Array(u16u16u16AaMode)

An array of 2D textures. Equivalent to Texture3D except that texels in a different depth level are not sampled.

D3(u16u16u16)

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(u16u16)

An array of Cube textures.

Methods

impl Kind

fn get_dimensions(&self) -> (u16, u16, u16, AaMode)

Get texture dimensions, with 0 values where not applicable.

fn get_level_dimensions(&self, level: u8) -> (u16, u16, u16, AaMode)

Get the dimensionality of a particular mipmap level.

fn get_num_levels(&self) -> u8

Count the number of mipmap levels.

fn get_num_slices(&self) -> Option<u16>

Return the number of slices for an array, or None for non-arrays.

fn is_cube(&self) -> bool

Check if it's one of the cube kinds.

Trait Implementations

impl Debug for Kind

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl Clone for Kind

fn clone(&self) -> Kind

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Kind

impl Hash for Kind

fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher

impl PartialOrd<Kind> for Kind

fn partial_cmp(&self, __arg_0: &Kind) -> Option<Ordering>

fn lt(&self, __arg_0: &Kind) -> bool

fn le(&self, __arg_0: &Kind) -> bool

fn gt(&self, __arg_0: &Kind) -> bool

fn ge(&self, __arg_0: &Kind) -> bool

impl PartialEq<Kind> for Kind

fn eq(&self, __arg_0: &Kind) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Kind) -> bool

This method tests for !=.

impl Ord for Kind

fn cmp(&self, __arg_0: &Kind) -> Ordering

impl Eq for Kind