1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Make egui work on WebGPU out of the box. (#2945)

* Make wgpu webgl/gles opt-in (but still work out of the box via feature flag), workaround canvas creation issue

* missing allow unsafe code annotations

* add breaking change not to eframe release notes

* Add --webgpu flag to build_demo_web.sh

* Improve CHANGELOG docs

* Clean up, and prepare for having to wasm:s

* put canvas without workaround under `if false`

* fix spelling

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Andreas Reich
2023-04-24 11:26:45 +02:00
committed by GitHub
parent 09e1569bf3
commit 0e6d69d4c4
7 changed files with 73 additions and 28 deletions

View File

@@ -62,7 +62,7 @@ __screenshot = []
## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu)).
## This overrides the `glow` feature.
wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster"]
wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster", "dep:raw-window-handle"]
# Allow crates to choose an android-activity backend via Winit
# - It's important that most applications should not have to depend on android-activity directly, and can
@@ -181,5 +181,6 @@ web-sys = { version = "0.3.58", features = [
# optional web:
egui-wgpu = { version = "0.21.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit
raw-window-handle = { version = "0.5.2", optional = true }
tts = { version = "0.25", optional = true, default-features = false }
wgpu = { version = "0.16.0", optional = true, features = ["webgl"] }
wgpu = { version = "0.16.0", optional = true }