Module render

Module render 

Source
Expand description

Rendering engine for OpenKit.

Provides GPU-accelerated rendering using wgpu with a CPU fallback using tiny-skia.

§GPU Acceleration

The GPU renderer provides:

  • Batched draw calls for minimal GPU overhead
  • Custom WGSL shaders for primitives (rectangles, rounded rectangles, gradients)
  • Texture atlas for efficient text and image rendering
  • GPU-accelerated effects (blur, shadow, glow)
  • Multi-sample anti-aliasing (MSAA)
  • HDR support (when available)

§Performance Tips

  • Draw calls are automatically batched - draw similar elements together
  • Use the texture atlas for frequently-used images
  • Minimize effect usage (blur, shadow) as they require extra passes

Re-exports§

pub use gpu::GpuRenderer;
pub use gpu::GpuConfig;
pub use gpu::GpuError;
pub use gpu::RenderStats;
pub use gpu::PowerPreference;

Modules§

gpu
GPU-accelerated rendering engine for OpenKit.

Structs§

CpuRenderer
CPU renderer using tiny-skia.
Painter
A painter for drawing primitives.
Renderer
The main renderer.
TextRenderer
Text renderer using cosmic-text.

Enums§

DrawCommand
Draw commands.
RenderError
Render error types.