frus-gpu
frus's 2D renderer: it takes a Scene and turns it into pixels through
wgpu (Vulkan, Metal, DX12, WebGPU).
Layer: Foundations. It depends on no windowing library: the shell hands it a surface, and it owns the device, the pipelines, batching, tessellation and the glyph atlas. See ARCHITECTURE.md.
What you reach for
Renderer: created on a surface,render(&scene)once per frame.render_offscreen: the same pipeline into a texture read back as RGBA bytes, with no window. It returnsNonewhen there is no GPU adapter; golden tests are built on it.draw_calls: how many draw calls a scene will cost, to check that a screen batches.
Example
use ;
let mut scene = new;
for row in 0..10
// Ten rectangles that do not overlap are one batch.
assert_eq!;
Part of frus
frus-shell drives the renderer for an application, and frus-test for tests. See the
workspace README. Licensed under MIT or
Apache-2.0.