Based on https://github.com/hasenbanck/egui_wgpu_backend
`egui-wgpu` is now an official backend for `eframe` (opt-in).
Use the `wgpu` feature flag on `eframe` and the `NativeOptions::renderer` settings to pick it.
Co-authored-by: Nils Hasenbanck <nils@hasenbanck.de>
Co-authored-by: Sven Niederberger <niederberger@embotech.com>
Co-authored-by: Sven Niederberger <73159570+s-nie@users.noreply.github.com>
* Remove integration name (it is always eframe)
* Remove egui_web crate
* Move egui_web/CHANGELOG.md into eframe/CHANGELOG.md
* Remove all mentions of egui_web
* Remove epi crate and absorb into eframe
* egui_glow: only use puffin on native
* Remove WASM doc from CI (we don't generate it anyways!)
* Remove eframe::epi and improve eframe docs
* Move all epi-related code from egui_glow into eframe
* Move epi stuff from egui-winit into eframe
* Remove mention of epi in egui
* Remove mention of epi in egui_glium
* Remove trait epi::NativeTexture
* Remove confusing mentions of epi
* Refactor egui_web: break up into smaller files
* Clean up feature flags further, and update changelogs
* Clean up check.sh
* Small cleanup of egui_web/Cargo.toml
* Fix dependencies for pure_glow example
* Fix clippy false positive
* Move examples out of eframe/examples into examples/
Give each example a `Cargo.toml` and `src/main.rs`.
This makes it easier for people to use as templates.
* Update README.md with more deps needed on vanilla Ubuntu
* Install libgtk-3-dev on CI, hoping that will fix something
* Update to rust 1.60.0
* Rename the feature `convert_bytemuck` to `bytemuck`
* Rename the feature `serialize` to `serde`.
* Make use of the "weak dependency" cargo feature
* Set rust-version = "1.60" for all crates
* egui_glow: clipboard, links, persistence & winit are now opt-in features
This can be used, for instance, to:
* Render things to offscreen buffers.
* Read the pixel buffer from the previous frame (glow::Context::read_pixels).
* Render things behind the egui windows.
The purpose of this is to expose `frame.storage()` and `frame.storage_mut()` so users can save/load app state from the `App::update` function, without having to add another parameter to that function.
Changes:
* Added `Frame::storage()` and `Frame::storage_mut()`
* `App::update` now takes a `&mut Frame` rather than just `&Frame`
* `Frame` is no longer `Clone` or `Sync` (doesn't have to be since https://github.com/emilk/egui/pull/1366)
This adds a callback (set by `Context::set_request_repaint_callback`)
which integration can use to wake up the UI thread.
eframe (egui_web and egui_glow) will use this, replacing
`epi::Frame::request_repaint`.
Existing code calling `epi::Frame::request_repaint` should be changed
to instead call `egui::Context::request_repaint`.
This is the first callback added to the egui API, which otherwise is
completely driven by data.
The purpose of this is to remove the confusion between the two
`request_repaint` methods (by removing one). Furthermore, it makes
`epi::Frame` a lot simpler, allowing future simplifications to it
(perhaps no longer having it be `Send+Sync+Clone`).
* Add Shape::Callback to do custom rendering inside of an egui UI
* Use Rc<glow::Context> everywhere
* Remove trait WebPainter
* Add glow::Context to epi::App::setup
* egui_web: always use the glow painter, and remove the old WebGL code.
* Clean up the WebPainter trait
* Clarify WebGL1 warning text in color test
The glow painter became standard in egui 0.17, and I've heard no complaints! So let's simplify and go all in on glow.
Part of https://github.com/emilk/egui/issues/1198
This adds all parts of the web "location" (URL) to frame.info().web_info, included a HashMap of the query parameters, percent-decoded and ready to go.
This lets you easily pass key-value pairs to your eframe web app.