| Crates.io | gapp-winit |
| lib.rs | gapp-winit |
| version | 0.10.0 |
| created_at | 2021-04-12 22:27:13.632339+00 |
| updated_at | 2026-01-24 13:21:39.714563+00 |
| description | Abstract event loop library for winit-based applications with OpenGL and wgpu backends, integrating gapp traits for clean separation of input, update, render, and present |
| homepage | https://gitlab.com/porky11/gapp-winit |
| repository | https://gitlab.com/porky11/gapp-winit |
| max_upload_size | |
| id | 382568 |
| size | 67,626 |
An abstract event loop library for winit-based applications with support for OpenGL/glutin and wgpu backends. Integrates seamlessly with gapp traits for clean separation of input, update, render, and present.
Supports native (Windows/Linux/macOS) and WASM. Fixed-timestep FPS cap, automatic resize handling.
WindowInput, Present, Render (gapp), Update (gapp).| Feature | OpenGL | wgpu |
|---|---|---|
| Native | ✅ | ✅ |
| WASM | ✅ | ✅ |
| Default | ✅ | ❎️ |
For reference, have a look at the template program. It also can be used as a base for your program.
WindowInput<C, R>: Handle all WindowEvents (post-resize/redraw). Call event_loop.exit() on close.Present<R>: Submit frame (e.g., queue.submit(), surface.swap_buffers()).Render<R> / Update (from gapp): Standard render/update loop.Resize is auto-handled.
FPS can be supplied to run.