retroglyph-window
A shared windowing layer for retroglyph's
window-based backends (software today; GL/wgpu are future candidates). Input and Output are
independent facets of Backend, which fits a terminal process (one type implements both) but not a
window, where an event loop owns input and a renderer owns output separately: this crate keeps that
split (Presenter is an Output supertrait; WindowBackend owns its own Input queue) and
reassembles both into one Backend via winit.
Most consumers don't depend on this crate directly; use
retroglyph-software instead, which depends on it.
Quick start
[]
= "0.1"
A game never implements Presenter itself (that's retroglyph-software's job), but a new
renderer backend does. This is the whole contract it implements, sized to fit a window from its own
cell geometry via WindowConfig::fit:
use DrawCell;
use Output;
use Size;
use WindowConfig;
use ;
use Arc;
;
let config = fit;
assert_eq!;
Hand a real Presenter (e.g. retroglyph-software's SoftwareRenderer) and a config like this
to run_windowed/run_app to actually open a window and drive the event loop.
See docs.rs for the API.