Skip to main content

write_rgba_texture_region

Function write_rgba_texture_region 

Source
pub fn write_rgba_texture_region(
    queue: &Queue,
    texture: &Texture,
    data: &[u8],
    x: u32,
    y: u32,
    width: u32,
    height: u32,
)
Expand description

Write RGBA pixel data to a specific region of a texture.

ยงArguments

  • queue - The wgpu queue
  • texture - The target texture
  • data - RGBA pixel data (4 bytes per pixel)
  • x - X offset in pixels
  • y - Y offset in pixels
  • width - Region width in pixels
  • height - Region height in pixels