1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -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:
Emil Ernerfeldt
2025-11-12 10:51:38 +01:00
committed by GitHub
parent 1af5d1d37e
commit df6f35d568
10 changed files with 77 additions and 75 deletions

View File

@@ -84,9 +84,9 @@ impl AppRunner {
#[cfg(feature = "glow")]
get_proc_address: None,
#[cfg(all(feature = "wgpu", not(feature = "glow")))]
#[cfg(all(feature = "wgpu_no_default_features", not(feature = "glow")))]
wgpu_render_state: painter.render_state(),
#[cfg(all(feature = "wgpu", feature = "glow"))]
#[cfg(all(feature = "wgpu_no_default_features", feature = "glow"))]
wgpu_render_state: None,
};
let app = app_creator(&cc).map_err(|err| err.to_string())?;
@@ -98,9 +98,9 @@ impl AppRunner {
#[cfg(feature = "glow")]
gl: Some(painter.gl().clone()),
#[cfg(all(feature = "wgpu", not(feature = "glow")))]
#[cfg(all(feature = "wgpu_no_default_features", not(feature = "glow")))]
wgpu_render_state: painter.render_state(),
#[cfg(all(feature = "wgpu", feature = "glow"))]
#[cfg(all(feature = "wgpu_no_default_features", feature = "glow"))]
wgpu_render_state: None,
};