Skip to main content

Module texture

Module texture 

Source
Expand description

Texture upload utilities for the textured pipeline.

upload_image converts an ImageData into a GPU texture + sampler pair ready to bind in a render pass. queue.write_texture is used directly — it does not require 256-byte row alignment (unlike copy_buffer_to_texture).

TexturedDraw carries the pre-built TexVertex list alongside the image data and per-draw state needed by the render loop in renderer.rs.

Structs§

TexturedDraw
One textured draw call: a vertex list plus the source image and draw state.

Functions§

upload_image
Upload image to a new Rgba8Unorm GPU texture and create a matching sampler.