pub fn run<F>(title: &str, size: Size2D, frame_fn: F)where F: FnMut(&mut FrameState<'_>) + 'static,
Runs a single-window application with a per-frame closure.
This is the simplest way to get a window on screen. On error, the error is logged and the process exits with ERROR.
ERROR
use optic_loop::run; run("Hello", (800, 600).into(), |frame| { frame.gpu.clear(); });