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, }
Expand description

Describes a [Texture].

Fields

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.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.