Skip to content

Commit

Permalink
agdk-egui: use upstream egui-winit + egui-wgpu crates
Browse files Browse the repository at this point in the history
The functionality found in egui_winit_platform and egui_wgpu_backend is
now available in the upstream egui-winit and egui-wgpu crates
respectively.

This has simplified the example itself and also removed the dependency
on epi.

The example is now based on egui 0.18 (was previously 0.17)

Since the upstream egui-winit/wgpu crates were generally assuming that
the graphics context and surface can be initialized immediately this
currently builds against a branch that aims to upstream changes that
remove these assumptions:

https://github.com/rib/egui/tree/android-deferred-winit-wgpu
Ref: emilk/egui#1634
  • Loading branch information
rib committed May 17, 2022
1 parent bfc0d09 commit 69d0de4
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 372 deletions.
21 changes: 12 additions & 9 deletions examples/agdk-egui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ resolver = "2"

[dependencies]
log = "0.4"
winit = { git = "https://github.com/rib/winit", branch = "agdk-game-activity" }
#winit = { path="../../../winit" }
winit = "0.26"
wgpu = "0.12.0"
pollster = "0.2"
#egui_winit_platform = "0.14"
egui_winit_platform = { path = "../../../egui_winit_platform" }
egui_wgpu_backend = "0.17"
egui = "0.17"
chrono = "0.4"
epi = "0.17"
egui_demo_lib = "0.17"
egui = "0.18"
egui-wgpu = { version = "0.18", features = [ "winit" ] }
egui-winit = { version = "0.18", default-features = false }
egui_demo_lib = "0.18"

[patch.crates-io]
winit = { git = "https://github.com/rib/winit", branch = "agdk-game-activity" }
#winit = { path="../../../winit" }
egui = { git = "https://github.com/rib/egui", branch = "android-deferred-winit-wgpu" }
egui-winit = { git = "https://github.com/rib/egui", branch = "android-deferred-winit-wgpu" }
egui-wgpu = { git = "https://github.com/rib/egui", branch = "android-deferred-winit-wgpu" }
#egui = { path = "../../../egui/egui" }
#egui-wgpu = { path = "../../../egui/egui-wgpu" }
#egui-winit = { path = "../../../egui/egui-winit" }

[target.'cfg(not(target_os = "android"))'.dependencies]
env_logger = "0.9"
Expand Down
3 changes: 3 additions & 0 deletions examples/agdk-egui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ This tests using the game_activity crate with egui, winit and wgpu.
This is based on a re-worked winit backend here:
https://github.com/rib/winit/tree/agdk-game-activity

and based on updated egui-winit and egui-wgpu crates here:
https://github.com/rib/egui/tree/android-deferred-winit-wgpu

```
rustup target add aarch64-linux-android
Expand Down
Loading

0 comments on commit 69d0de4

Please sign in to comment.