mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Make wgpu the default renderer for eframe and egui.rs (#7615)
* Closes https://github.com/emilk/egui/issues/5889 See the above issue for motivation. To use glow instead, disable the default features of `eframe` and opt-in to `glow`. This also changes egui.rs to use wgpu, which means WebGPU when available, and WebGL otherwise
This commit is contained in:
@@ -28,9 +28,9 @@ workspace = true
|
||||
default = [
|
||||
"accesskit",
|
||||
"default_fonts",
|
||||
"glow",
|
||||
"wayland", # Required for Linux support (including CI!)
|
||||
"web_screen_reader",
|
||||
"wgpu",
|
||||
"winit/default",
|
||||
"x11",
|
||||
]
|
||||
@@ -52,7 +52,11 @@ android-native-activity = ["egui-winit/android-native-activity"]
|
||||
## If you plan on specifying your own fonts you may disable this feature.
|
||||
default_fonts = ["egui/default_fonts"]
|
||||
|
||||
## Use [`glow`](https://github.com/grovesNL/glow) for painting, via [`egui_glow`](https://github.com/emilk/egui/tree/main/crates/egui_glow).
|
||||
## Enable [`glow`](https://github.com/grovesNL/glow) for painting, via [`egui_glow`](https://github.com/emilk/egui/tree/main/crates/egui_glow).
|
||||
##
|
||||
## There is generally no need to enable both the `wgpu` and `glow` features,
|
||||
## but if you do you can pick the renderer to use with [`NativeOptions::renderer`]
|
||||
## and `WebOptions::renderer`.
|
||||
glow = ["dep:egui_glow", "dep:glow", "dep:glutin-winit", "dep:glutin"]
|
||||
|
||||
## Enable saving app state to disk.
|
||||
@@ -74,9 +78,15 @@ wayland = [
|
||||
## For other platforms, use the `accesskit` feature instead.
|
||||
web_screen_reader = ["web-sys/SpeechSynthesis", "web-sys/SpeechSynthesisUtterance"]
|
||||
|
||||
## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/main/crates/egui-wgpu)).
|
||||
## Enable [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/main/crates/egui-wgpu)).
|
||||
##
|
||||
## This overrides the `glow` feature.
|
||||
## There is generally no need to enable both the `wgpu` and `glow` features,
|
||||
## but if you do you can pick the renderer to use with [`NativeOptions::renderer`]
|
||||
## and `WebOptions::renderer`.
|
||||
##
|
||||
## Switching from `wgpu (the default)` to `glow` can significantly reduce your binary size
|
||||
## (including the .wasm of a web app).
|
||||
## See <https://github.com/emilk/egui/issues/5889> for more details.
|
||||
##
|
||||
## By default, eframe will prefer WebGPU over WebGL, but
|
||||
## you can configure this at run-time with [`NativeOptions::wgpu_options`].
|
||||
|
||||
Reference in New Issue
Block a user