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

Add egui_wgpu crate (#1564)

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>
This commit is contained in:
Emil Ernerfeldt
2022-05-12 09:02:28 +02:00
committed by GitHub
parent 3d52cc8867
commit 931e716b97
32 changed files with 1540 additions and 101 deletions

View File

@@ -20,7 +20,7 @@ all-features = true
[features]
default = ["default_fonts"]
default = ["default_fonts", "glow"]
# detect dark mode system preference
dark-light = ["dep:dark-light"]
@@ -29,6 +29,8 @@ dark-light = ["dep:dark-light"]
# If you plan on specifying your own fonts you may disable this feature.
default_fonts = ["egui/default_fonts"]
glow = ["dep:glow", "egui_glow"]
# Enable saving app state to disk.
persistence = [
"directories-next",
@@ -49,19 +51,23 @@ screen_reader = [
"tts",
]
# Use WGPU as the backend instead of glow
wgpu = ["egui-wgpu"]
[dependencies]
egui = { version = "0.18.0", path = "../egui", default-features = false, features = [
"bytemuck",
"tracing",
] }
egui_glow = { version = "0.18.0", path = "../egui_glow", default-features = false }
glow = "0.11"
tracing = "0.1"
# optional:
egui_glow = { version = "0.18.0", path = "../egui_glow", optional = true, default-features = false }
egui-wgpu = { version = "0.18.0", path = "../egui-wgpu", optional = true, features = ["winit"] }
glow = { version = "0.11", optional = true }
ron = { version = "0.7", optional = true }
serde = { version = "1", optional = true }
serde = { version = "1", optional = true, features = ["derive"] }
# -------------------------------------------
# native: