Skip to content

Runtime overview

Projects implement warp_core::Renderer. The current trait includes lifecycle construction, keyboard/mouse input, optional multitouch, world rendering, window-space GUI, and an optional game-image GUI pass. It also exposes hooks for viewport focus, camera setup, CRT coordinate correction, and scene underlay/overlay passes.

The essential shape is:

impl Renderer for MyProject {
fn new() -> Self { /* project state */ }
fn input(&mut self, viewport: ViewportId, input: &WinitInputHelper, width: u16, height: u16) {}
fn render(&mut self, viewport: ViewportId, ctx: &mut RenderContext) {}
fn gui(&mut self, viewport: ViewportId, ctx: &egui::Context, display: &mut DisplaySettings) {}
}

The default methods are deliberately permissive so existing projects can adopt newer optional capabilities without implementing every hook. Warp provides the host and frame lifecycle; the project provides the world.