Module canvas

Module canvas 

Source
Expand description

Integration between egui and SDL2’s sdl2::render::Canvas API.

This module provides EguiCanvas, a convenience wrapper that bundles together:

§When to use

Use EguiCanvas if you want to render egui using SDL2’s 2D canvas API instead of OpenGL.

§Usage

Typical usage is to:

  1. Create an EguiCanvas for your SDL2 window and canvas
  2. Pass SDL2 events to EguiCanvas::on_event
  3. Call EguiCanvas::run providing our UI function
  4. Paint egui output via EguiCanvas::paint

Re-exports§

pub use painter::*;

Modules§

painter
Canvas backend for egui-sdl2.

Structs§

EguiCanvas
Integration between egui and sdl2::render::Canvas for app based on sdl2.