Skip to main content

mln_webgpu/
lib.rs

1//! The WebGPU backend, on the `wgpu` crate: [`WebGpu`], the backend's
2//! [`Gpu`](mln_gfx::gpu::Gpu), with its shaders, and the targets the
3//! renderer draws frames into.
4//!
5//! A [`RendererBackend`] renders on a [`Device`], into an
6//! [`OffscreenTarget`], a [`SurfaceTarget`] or a [`BorrowedTarget`] built on
7//! it.
8
9mod borrowed_target;
10mod custom_layer;
11mod device;
12mod gpu;
13mod index_table;
14mod renderer_backend;
15mod shaders;
16mod surface_target;
17mod writes;
18
19pub use borrowed_target::{BorrowedTarget, BorrowedTextures, depth_stencil_format};
20pub use custom_layer::{CustomLayerEncoder, CustomLayerPass};
21pub use device::Device;
22pub use gpu::WebGpu;
23pub use renderer_backend::RendererBackend;
24pub use surface_target::{Overlay, OverlayTarget, SurfaceOptions, SurfaceTarget};
25
26/// Frames drawn into textures of the library's and read back.
27pub type OffscreenTarget = mln_gfx::offscreen_target::OffscreenTarget<RendererBackend>;
28
29#[cfg(test)]
30mod tests;