logo
pub struct Texture { /* private fields */ }
Expand description

Handle to a texture on the GPU.

It can be created with Device::create_texture.

Corresponds to WebGPU GPUTexture.

Implementations

Returns the inner hal Texture using a callback. The hal texture will be None if the backend type argument does not match with this wgpu Texture

Safety
  • The raw handle obtained from the hal Texture must not be manually destroyed

Creates a view of this texture.

Destroy the associated native resources as soon as possible.

Make an ImageCopyTexture representing the whole texture.

Trait Implementations

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.