Pixstage
Pixstage is a tiny pixel buffer library built on top of wgpu.
It targets retro game emulators and software renderers, with two core goals:
- Retro-friendly: first-class
Indexed8 + Paletterendering (palette lookup happens on the GPU). - Fast uploads: dirty-rect tracking to avoid uploading the whole frame when only a small area changes.
Pixstage is windowing-framework-agnostic: any framework that supports raw-window-handle can be used.
Features
PixstageRgba:RGBA8pixel buffer with incremental texture updatesPixstageIndexed:Indexed8 + Palettewith GPU palette lookup (great for palette cycling)PixstageRgb565:RGB565input with incremental upload (converted to RGBA8 only for dirty regions)PixstageArgb1555:ARGB1555input with incremental upload (1-bit alpha)ScalingMode::PixelPerfectandScalingMode::FillPixstageOptions: shared configuration (backends/present_mode/scaling/clear_color)
Examples
rectangle_and_line: simple drawing usingPixstageRgbapalette_cycle: palette animation usingPixstageIndexedrgb565_checker: RGB565 input example usingPixstageRgb565argb1555_alpha: ARGB1555 (1-bit alpha) example usingPixstageArgb1555
Run:
Minimal usage (winit)
use ;
use EventLoop;
use Window;
# let event_loop = new.unwrap;
# let window = new.unwrap;
# let size = window.inner_size;
let surface = new?;
let mut stage = new_async.await?;
// Write pixels
stage.set_pixel;
stage.render?;
# Ok::
Notes
- The examples use
winit, but the library itself does not depend on it.