Expand description
The RavenRS render engine.
Renderer turns a ravenrs_core::Scene into one wgpu render pass:
- Quads (rounded rectangles, borders, linear gradients, soft shadows) are
instanced and shaded with a signed-distance function (
shaders/quad.wgsl), so edges are anti-aliased analytically at any scale factor. - Images are textures with a full mip chain, cached by image id, drawn
with the same rounded-corner SDF mask as quads (
shaders/image.wgsl). - Text is rasterized once per glyph/size/subpixel offset with
swashinto an R8 atlas and drawn as textured quads (shaders/glyph.wgsl).
Consecutive primitives of the same kind are batched; painter’s order is kept. Instance buffers are reused and only grow. Nothing is read back from the GPU.
The crate does not own windows or surfaces: platform crates create the
device and call Renderer::render with the frame’s texture view.
Re-exports§
pub use wgpu;
Structs§
- GpuContext
- A device and queue ready for rendering.
- Render
Stats - Counters for profiling and tests.
- Renderer
- Draws
Scenes with wgpu. Create one per device; it is reused every frame.
Enums§
- GpuError
- Failure to set up the GPU for rendering.
Functions§
- gpu_
report - Describes the adapter in use and the alternatives.
permissiveis an instance that also accepts non-conformant drivers, sinceinstancenever shows those. - preferred_
surface_ format - Picks the surface format. Non-sRGB formats are preferred so blending happens
in sRGB space, matching browsers and design tools;
*Srgbformats still work because the shaders linearize colors when told to. - surface_
report - Describes
formatandpresent_modeon a surface with these capabilities.