Struct wgpu_types::TextureDescriptor[][src]

#[repr(C)]pub struct TextureDescriptor<L> {
    pub label: L,
    pub size: Extent3d,
    pub mip_level_count: u32,
    pub sample_count: u32,
    pub dimension: TextureDimension,
    pub format: TextureFormat,
    pub usage: TextureUsage,

Describes a [Texture].


label: L

Debug label of the texture. This will show up in graphics debuggers for easy identification.

size: Extent3d

Size of the texture. For a regular 1D/2D texture, the unused sizes will be 1. For 2DArray textures, Z is the number of 2D textures in that array.

mip_level_count: u32

Mip count of texture. For a texture with no extra mips, this must be 1.

sample_count: u32

Sample count of texture. If this is not 1, texture must have BindingType::Texture::multisampled set to true.

dimension: TextureDimension

Dimensions of the texture.

format: TextureFormat

Format of the texture.

usage: TextureUsage

Allowed usages of the texture. If used in other ways, the operation will panic.


impl<L> TextureDescriptor<L>[src]

pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> TextureDescriptor<K>[src]

Trait Implementations

impl<L: Clone> Clone for TextureDescriptor<L>[src]

impl<L: Debug> Debug for TextureDescriptor<L>[src]

impl<'de, L> Deserialize<'de> for TextureDescriptor<L> where
    L: Deserialize<'de>, 

impl<L: Eq> Eq for TextureDescriptor<L>[src]

impl<L: Hash> Hash for TextureDescriptor<L>[src]

impl<L: PartialEq> PartialEq<TextureDescriptor<L>> for TextureDescriptor<L>[src]

impl<L> Serialize for TextureDescriptor<L> where
    L: Serialize

impl<L> StructuralEq for TextureDescriptor<L>[src]

impl<L> StructuralPartialEq for TextureDescriptor<L>[src]

Auto Trait Implementations

impl<L> RefUnwindSafe for TextureDescriptor<L> where
    L: RefUnwindSafe

impl<L> Send for TextureDescriptor<L> where
    L: Send

impl<L> Sync for TextureDescriptor<L> where
    L: Sync

impl<L> Unpin for TextureDescriptor<L> where
    L: Unpin

impl<L> UnwindSafe for TextureDescriptor<L> where
    L: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.