Skip to main content

Crate cvkg_render_software

Crate cvkg_render_software 

Source
Expand description

§CVKG Software Renderer

CPU fallback renderer for environments without GPU/WebGPU access (CI servers, headless testing, embedded systems). Implements the Renderer trait with pure-software rasterization into an RGBA pixel buffer.

§Capabilities

  • Opaque rectangles (trivial)
  • Rounded rectangles (analytical AA via signed distance)
  • Ellipses (analytical AA)
  • Stroked shapes (rect, rounded rect, ellipse)
  • Lines (Bresenham with AA)
  • Basic text (via cvkg-runic-text, bitmap glyph blitting)
  • Linear gradients (horizontal only)
  • Solid glass fallback (tint only, no refraction)

§Limitations

  • No glass refraction/software ray-tracing (degrades to solid tint)
  • No SVG path rendering
  • No texture sampling
  • No 3D (all 3D methods are no-ops)
  • No MSAA (uses 4x supersampling for rounded shapes/ellipses)

Structs§

Framebuffer
RGBA8 pixel buffer with depth buffer for basic overlap testing.
SoftwareRenderer
CPU rasterizer implementing the Renderer trait.