Enum gfx_core::tex::Kind [] [src]

pub enum Kind {
    D1(Size),
    D1Array(SizeLayer),
    D2(SizeSizeAaMode),
    D2Array(SizeSizeLayerAaMode),
    D3(SizeSizeSize),
    Cube(Size),
    CubeArray(SizeLayer),
}

Specifies the kind of a texture storage to be allocated.

Variants

D1(Size)

A single row of texels.

D1Array(SizeLayer)

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

D2(SizeSizeAaMode)

A traditional 2D texture, with rows arranged contiguously.

D2Array(SizeSizeLayerAaMode)

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

D3(SizeSizeSize)

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

An array of Cube textures.

Methods

impl Kind
[src]

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

impl Debug for Kind
[src]

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

Formats the value using the given formatter.

impl Clone for Kind
[src]

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
[src]

impl Hash for Kind
[src]

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

Feeds this value into the state given, updating the hasher as necessary.

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

Feeds a slice of this type into the state provided.

impl PartialOrd for Kind
[src]

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

This method returns an ordering between self and other values if one exists. Read more

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

This method tests less than (for self and other) and is used by the < operator. Read more

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

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

This method tests greater than (for self and other) and is used by the > operator. Read more

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq for Kind
[src]

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
[src]

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

This method returns an Ordering between self and other. Read more

impl Eq for Kind
[src]