egui-sdl2
This crate provides integration between egui and sdl2. It also includes optional glow support for rendering. Implementation follows the design of the official egui-winit and egui_glow crates, using them as references.
Features include:
- Translation of sdl2 events to egui.
- Handling egui's PlatformOutput (clipboard, cursor updates, opening links — optional via
linksfeature). - Rendering egui via glow (optional via
glow-backend)
Both egui and sdl2 are re-exported for convenience. The sdl2 re-export includes all feature flags available to use.
Usage
To get started, create an EguiGlow instance to handle rendering with glow, provide it with events, and then call run and paint. Alternatively, create a State instance if you only need event handling. Examples are available in the examples/ directory. You can run the “hello world” example with: