Skip to main content

Module textures

Module textures 

Source

Structs§

GPUTexture
A texture uploaded to the GPU, ready to bind (e.g. via BindingInstanceEntry::Texture). Opaque — bind it into a bind group via BindGroupBuilder::texture_2d, there’s no way to reach the underlying wgpu::Texture/TextureView from outside this crate.
Texture
Source data for GPUTexture, loaded from a file or supplied as raw bytes. Fields are private — the only way to construct one is TextureBuilder: TextureBuilder::from_file(...).build().
TextureBuilder
Builds a Texture — load pixel data from a file, supply raw bytes directly, or allocate an empty texture with no initial data. Start from from_file/from_data/empty, chain the setters below, then finish with build/build_asset.
TexturePlugin
Registers the GPUTexture asset pipeline (Assets<Texture>ProcessedAssets<GPUTexture>), plus the MipmapGenerator it depends on for generate_mips. Included by WGPUPlugin; add directly only if you’re assembling the wgpu module’s plugins by hand.