Skip to content

Releases: ddalcu/zigui

v0.3.2

Choose a tag to compare

@ddalcu ddalcu released this 27 Jun 14:42

Full Changelog: v0.3.1...v0.3.2

v0.2.0 — GPU rendering

Choose a tag to compare

@ddalcu ddalcu released this 10 Jun 04:04

GPU rendering via SDL_GPU — Metal on macOS, Vulkan on Linux/Windows

On-screen rendering now runs on the GPU through SDL3's GPU API, with the pure-Zig software rasterizer kept as an automatic runtime fallback. Apps need no code or build changes — the runtime picks the GPU when available and falls back silently (ZIGUI_SOFTWARE=1 or Config.gpu = false forces the software path). No new dependencies: SDL3 (>= 3.2) is all you need, same as before.

Highlights

  • One unified instanced pipeline draws every primitive (rounded rects, strokes, gradients, lines, glyphs, images) in a single draw call per run, evaluating the same SDFs as the software rasterizer in the fragment shader — output is pixel-identical (max 1 LSB/channel) across every showcase section, theme family, dark mode, overlays, and materials.
  • Materials/blur on GPU: blur_rect is a horizontal box-blur pass into a scratch texture plus a vertical-blur-and-tint composite, matching the CPU's separable box blur.
  • Glyphs/images live in a shelf-packed atlas fed by the existing GlyphCache — text stays crisp at any HiDPI scale.
  • ~7× faster frames at Retina (1960×1320): ~1.3 ms vs ~8.9 ms, with the remainder mostly CPU-side build/layout.
  • Headless GPU verification: showcase --screenshot out.bmp --gpu renders through the real pipeline without a window; CI diffs it against the software frame.
  • The translation layer (src/render/gpu_scene.zig) is pure Zig and fully unit-tested headlessly; the C surface stays confined to the app layer.

Also: new mic and square icons in the bundled Lucide subset.

Notes

  • Windows currently uses SDL_GPU's Vulkan backend (D3D12 needs DXIL shader blobs — a follow-up); machines without Vulkan drivers get the software fallback automatically.
  • Known benign rendering difference: GPU subpixel snapping can round a glyph sitting exactly on a half-pixel boundary to the neighboring column (<0.01% of pixels, still crisp).
zig fetch --save git+https://github.com/ddalcu/zigui#v0.2.0

v0.1.0

Choose a tag to compare

@ddalcu ddalcu released this 04 Jun 16:54

First public release of zigui — a SwiftUI-like UI library in pure Zig (CPU software rasterizer presented via SDL3). Core + post-v0 features (navigation, tabs, modals, grids, animation, materials, accessibility, HiDPI, wrapped text, scrolling, system tray) with 146 headless tests. Includes settings, showcase, and streaming llm-chat examples.