pub struct TextureWriteDescriptor { /* private fields */ }Expand description
Descriptor for queue.writeTexture(destination, data, dataLayout, size).
WebGPU’s writeTexture lets you upload CPU-side pixel data directly to a
texture without staging through a buffer. Use it for: ImGui font atlases,
procedural noise textures, sprite sheets, ImageBitmap pixels, etc.
Implementations§
Source§impl TextureWriteDescriptor
2D-upload convenience constructor for TextureWriteDescriptor.
impl TextureWriteDescriptor
2D-upload convenience constructor for TextureWriteDescriptor.
Source§impl TextureWriteDescriptor
impl TextureWriteDescriptor
pub fn get_data(&self) -> Vec<u8> ⓘ
pub fn get_bytes_per_row(&self) -> u32
pub fn get_rows_per_image(&self) -> u32
pub fn get_mip_level(&self) -> u32
pub fn get_texture(&self) -> JsValue
pub fn get_origin(&self) -> Option<JsValue>
pub fn try_get_origin(&self) -> Option<JsValue>
pub fn get_flip_y(&self) -> bool
Trait Implementations§
Source§impl Clone for TextureWriteDescriptor
impl Clone for TextureWriteDescriptor
Source§fn clone(&self) -> TextureWriteDescriptor
fn clone(&self) -> TextureWriteDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TextureWriteDescriptor
impl RefUnwindSafe for TextureWriteDescriptor
impl Send for TextureWriteDescriptor
impl Sync for TextureWriteDescriptor
impl Unpin for TextureWriteDescriptor
impl UnsafeUnpin for TextureWriteDescriptor
impl UnwindSafe for TextureWriteDescriptor
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