mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
eframe: add feature wgpu_no_default_features (#7700)
* Part of https://github.com/emilk/egui/issues/5889 * Closes https://github.com/emilk/egui/issues/7106 This changes the `eframe/wgpu` feature to also enable all the `default` features of `wgpu` and `egui-wgpu`. This makes switching `eframe` backend from `glow` to `wgpu` a lot easier. To get the old behavior (depend on `wgpu` but you must opt-in to all its features), use the new `wgpu_no_default_features` feature.
This commit is contained in:
@@ -33,10 +33,6 @@ default = [
|
||||
"web_screen_reader",
|
||||
"winit/default",
|
||||
"x11",
|
||||
"egui-wgpu?/fragile-send-sync-non-atomic-wasm",
|
||||
# Let's enable some backends so that users can use `eframe` out-of-the-box
|
||||
# without having to explicitly opt-in to backends
|
||||
"egui-wgpu?/default",
|
||||
]
|
||||
|
||||
## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/).
|
||||
@@ -82,16 +78,18 @@ web_screen_reader = ["web-sys/SpeechSynthesis", "web-sys/SpeechSynthesisUtteranc
|
||||
##
|
||||
## This overrides the `glow` feature.
|
||||
##
|
||||
## By default, only WebGPU is enabled on web.
|
||||
## If you want to enable WebGL, you need to turn on the `webgl` feature of crate `wgpu`:
|
||||
##
|
||||
## ```toml
|
||||
## wgpu = { version = "*", features = ["webgpu", "webgl"] }
|
||||
## ```
|
||||
##
|
||||
## By default, eframe will prefer WebGPU over WebGL, but
|
||||
## you can configure this at run-time with [`NativeOptions::wgpu_options`].
|
||||
wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster"]
|
||||
wgpu = ["wgpu_no_default_features", "egui-wgpu/default"]
|
||||
|
||||
## This is exactly like the `wgpu` feature, but does NOT enable the default features of `wgpu` and `egui-wgpu`.
|
||||
##
|
||||
## This means that no `wgpu` backends are enabled. You will need to enable them yourself, e.g. like this:
|
||||
##
|
||||
## ```toml
|
||||
## wgpu = { version = "*", features = ["dx12", "metal", "webgl"] }
|
||||
## ```
|
||||
wgpu_no_default_features = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster"]
|
||||
|
||||
## Enables compiling for x11.
|
||||
x11 = [
|
||||
|
||||
Reference in New Issue
Block a user