pub trait TextureInterface: CommonTraits {
// Required methods
fn create_view(
&self,
desc: &TextureViewDescriptor<'_>,
) -> DispatchTextureView;
fn destroy(&self);
fn size(&self) -> Extent3d;
fn mip_level_count(&self) -> u32;
fn sample_count(&self) -> u32;
fn dimension(&self) -> TextureDimension;
fn format(&self) -> TextureFormat;
fn usage(&self) -> TextureUsages;
// Provided method
unsafe fn mark_externally_initialized(&self) { ... }
}Required Methods§
fn create_view(&self, desc: &TextureViewDescriptor<'_>) -> DispatchTextureView
fn destroy(&self)
fn size(&self) -> Extent3d
fn mip_level_count(&self) -> u32
fn sample_count(&self) -> u32
fn dimension(&self) -> TextureDimension
fn format(&self) -> TextureFormat
fn usage(&self) -> TextureUsages
Provided Methods§
Sourceunsafe fn mark_externally_initialized(&self)
unsafe fn mark_externally_initialized(&self)
Marks this texture’s contents as already initialized, skipping wgpu’s lazy zero-initialization of it.
Defaults to a no-op, which is a valid implementation for backends (such as WebGPU) that have no concept of lazy zero-initialization.
§Safety
The entire contents of the texture must already be initialized.
Implementors§
impl TextureInterface for CoreTexture
Available on
wgpu_core only.