egui/egui-winit
Robert Bragg a5076d4cc4
egui_winit/wgpu: enable Android support (#1634)
* egui-winit: don't assume window available at init

On Android in particular we can only initialize render state once we
have a native window, after a 'Resumed' lifecycle event. It's still
practical to be able to initialize an egui_winit::State early on
so this adds setters for the max_texture_side and pixels_per_point
that can be called once we have a valid Window and have initialized
a graphics context.

On Wayland, where we need to access the Display for clipboard handling
we now get the Display from the event loop instead of a window.

* egui-wgpu: lazily initialize render + surface state

Enable the renderer and surface state initialization to be deferred
until we know that any winit window we created has a valid native window
and enable the surface state to be updated in case the native window
changes.

In particular these changes help with running on Android where winit
windows will only have a valid native window associated with them
between Resumed and Paused lifecycle events, and so surface creation
(and render state initialization) needs to wait until the first
Resumed event, and the surface needs to be dropped/recreated based on
Paused/Resumed events.
2022-05-22 20:24:41 +02:00
..
src egui_winit/wgpu: enable Android support (#1634) 2022-05-22 20:24:41 +02:00
Cargo.toml Fix clipboard on Wayland (#1613) 2022-05-16 16:37:41 +02:00
CHANGELOG.md egui_winit/wgpu: enable Android support (#1634) 2022-05-22 20:24:41 +02:00
README.md Split out new crate egui-winit from egui_glium (#735) 2021-09-28 17:33:28 +02:00

egui-winit

Latest version Documentation unsafe forbidden MIT Apache

This crates provides bindings between egui and winit.

The library translates winit events to egui, handled copy/paste, updates the cursor, open links clicked in egui, etc.