Enum gfx::device::tex::TextureKind [] [src]

pub enum TextureKind {
    Texture1D,
    Texture1DArray,
    Texture2D,
    Texture2DArray,
    Texture2DMultiSample(AaMode),
    Texture2DMultiSampleArray(AaMode),
    TextureCube(CubeFace),
    Texture3D,
}

Specifies how a given texture may be used. The available texture types are restricted by what Metal exposes, though this could conceivably be extended in the future. Note that a single texture can only ever be of one kind. A texture created as Texture2D will forever be Texture2D.

Variants

Texture1D

A single row of texels.

Texture1DArray

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

Texture2D

A traditional 2D texture, with rows arranged contiguously.

Texture2DArray

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

Texture2DMultiSample

A multi-sampled 2D texture. Each pixel may have more than one data value (sample) associated with it.

Texture2DMultiSampleArray

A array of multi-sampled 2D textures.

TextureCube

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

When creating a cube texture, the face is ignored, and storage for all 6 faces is created. When updating, only the face specified is updated.

Texture3D

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

Methods

impl TextureKind

fn get_aa_mode(&self) -> Option<AaMode>

Return the anti-aliasing mode of the texture

Trait Implementations

Derived Implementations

impl Debug for TextureKind

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

impl Clone for TextureKind

fn clone(&self) -> TextureKind

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

impl Copy for TextureKind

impl Hash for TextureKind

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

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

impl PartialOrd for TextureKind

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

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

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

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

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

impl PartialEq for TextureKind

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

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

impl Ord for TextureKind

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

impl Eq for TextureKind