pub struct TextureDescriptor { /* private fields */ }Expand description
The general texture constructor, covering 2D, 2D-array, and 3D textures.
Texture2DDescriptor is the narrow preset: a single layer, a
format string, and a usage string, with no label. The two fields
TextureDescriptor adds on top of it are what keep it general —
dimension selects between a 2D texture, a 2D array, and a 3D
texture, and label names the resource in the browser’s GPU debug
tooling, which is the only way to tell two same-sized textures apart
in a capture.
Implementations§
Source§impl TextureDescriptor
impl TextureDescriptor
pub fn get_width(&self) -> u32
pub fn get_mut_width(&mut self) -> &mut u32
pub fn set_width(&mut self, val: u32) -> &mut Self
pub fn get_height(&self) -> u32
pub fn get_mut_height(&mut self) -> &mut u32
pub fn set_height(&mut self, val: u32) -> &mut Self
pub fn get_depth_or_layers(&self) -> u32
pub fn get_mut_depth_or_layers(&mut self) -> &mut u32
pub fn set_depth_or_layers(&mut self, val: u32) -> &mut Self
pub fn get_dimension(&self) -> &'static str
pub fn get_mut_dimension(&mut self) -> &mut &'static str
pub fn set_dimension(&mut self, val: &'static str) -> &mut Self
pub fn get_format(&self) -> GpuTextureFormat
pub fn get_mut_format(&mut self) -> &mut GpuTextureFormat
pub fn set_format(&mut self, val: GpuTextureFormat) -> &mut Self
pub fn get_usage(&self) -> u32
pub fn get_mut_usage(&mut self) -> &mut u32
pub fn set_usage(&mut self, val: u32) -> &mut Self
pub fn get_mip_level_count(&self) -> u32
pub fn get_mut_mip_level_count(&mut self) -> &mut u32
pub fn set_mip_level_count(&mut self, val: u32) -> &mut Self
pub fn get_sample_count(&self) -> u32
pub fn get_mut_sample_count(&mut self) -> &mut u32
pub fn set_sample_count(&mut self, val: u32) -> &mut Self
pub fn get_label(&self) -> Option<String>
pub fn try_get_label(&self) -> Option<String>
pub fn get_mut_label(&mut self) -> &mut Option<String>
pub fn set_label(&mut self, val: Option<String>) -> &mut Self
Trait Implementations§
Source§impl Clone for TextureDescriptor
impl Clone for TextureDescriptor
Auto Trait Implementations§
impl Freeze for TextureDescriptor
impl RefUnwindSafe for TextureDescriptor
impl Send for TextureDescriptor
impl Sync for TextureDescriptor
impl Unpin for TextureDescriptor
impl UnsafeUnpin for TextureDescriptor
impl UnwindSafe for TextureDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more