Skip to content
dream-soft-render
guide

Documentation

How to draw with dream-soft-render, the rules every pixel follows, hosting egui, what makes a frame cheap, and the complete Rust API.

dream-soft-render rasterizes 2D triangles into a buffer of premultiplied RGBA8 bytes, on the CPU, the same way on every platform. You draw through its own API, or hand it an egui UI with the egui feature; both write the same surface.

Learn it#

  • Start here: add the crate, draw a frame, and save it as an image.
  • The rules: the contract every pixel follows. Coordinates, which pixels a shape covers, color, blending, sampling, limits and errors.

Use it#

  • Drawing: frames, rectangles, meshes, clipping and draw order.
  • Textures: making, patching and freeing them, premultiplying, and the budget.
  • Hosting egui: render_egui, egui’s textures and yours, frames that did not change, and the diagnostics log.
  • Presenting frames: getting the surface onto a framebuffer, into a file, or into a test.
  • Fast frames: what the rasterizer recognizes, what costs the most, and the benchmarks.

Look it up#

  • Platforms: what is architecture-specific, the NEON kernels, the supported Rust, the license, and what is tested where.
  • Rust API: every public type, method and constant, with its exact signature and every way it fails.