Enum gfx_core::tex::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

A single row of texels.

D1Array

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

D2

A traditional 2D texture, with rows arranged contiguously.

D2Array

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

D3

A volume texture, with each 2D layer arranged contiguously.

Cube

A set of 6 2D textures, one for each face of a cube.

CubeArray

An array of Cube textures.

Methods

impl Kind

fn get_dimensions(&self) -> Dimensions

Get texture dimensions, with 0 values where not applicable.

fn get_level_dimensions(&self, level: Level) -> Dimensions

Get the dimensionality of a particular mipmap level.

fn get_num_levels(&self) -> Level

Count the number of mipmap levels.

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

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

Derived Implementations

impl Debug for Kind

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

impl Clone for Kind

fn clone(&self) -> Kind

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

impl Copy for Kind

impl Hash for Kind

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

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl PartialOrd 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 for Kind

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

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

impl Ord for Kind

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

impl Eq for Kind