Build-fix for --no-default-features
This commit is contained in:
parent
f4cc1c5465
commit
eb10ef94f7
2 changed files with 11 additions and 4 deletions
|
@ -93,21 +93,27 @@ pub struct State {
|
||||||
/// Wraps many demo/test apps into one.
|
/// Wraps many demo/test apps into one.
|
||||||
pub struct WrapApp {
|
pub struct WrapApp {
|
||||||
state: State,
|
state: State,
|
||||||
|
|
||||||
|
#[cfg(any(feature = "glow", feature = "wgpu"))]
|
||||||
custom3d: crate::apps::Custom3d,
|
custom3d: crate::apps::Custom3d,
|
||||||
|
|
||||||
dropped_files: Vec<egui::DroppedFile>,
|
dropped_files: Vec<egui::DroppedFile>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WrapApp {
|
impl WrapApp {
|
||||||
pub fn new(cc: &eframe::CreationContext<'_>) -> Self {
|
pub fn new(_cc: &eframe::CreationContext<'_>) -> Self {
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
let mut slf = Self {
|
let mut slf = Self {
|
||||||
state: State::default(),
|
state: State::default(),
|
||||||
custom3d: crate::apps::Custom3d::new(cc),
|
|
||||||
|
#[cfg(any(feature = "glow", feature = "wgpu"))]
|
||||||
|
custom3d: crate::apps::Custom3d::new(_cc),
|
||||||
|
|
||||||
dropped_files: Default::default(),
|
dropped_files: Default::default(),
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "persistence")]
|
#[cfg(feature = "persistence")]
|
||||||
if let Some(storage) = cc.storage {
|
if let Some(storage) = _cc.storage {
|
||||||
if let Some(state) = eframe::get_value(storage, eframe::APP_KEY) {
|
if let Some(state) = eframe::get_value(storage, eframe::APP_KEY) {
|
||||||
slf.state = state;
|
slf.state = state;
|
||||||
}
|
}
|
||||||
|
@ -141,6 +147,7 @@ impl WrapApp {
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#[cfg(any(feature = "glow", feature = "wgpu"))]
|
||||||
vec.push((
|
vec.push((
|
||||||
"🔺 3D painting",
|
"🔺 3D painting",
|
||||||
"custom3d",
|
"custom3d",
|
||||||
|
|
|
@ -56,7 +56,7 @@ serde = ["dep:serde", "ahash/serde", "emath/serde"]
|
||||||
emath = { version = "0.18.0", path = "../emath" }
|
emath = { version = "0.18.0", path = "../emath" }
|
||||||
|
|
||||||
ab_glyph = "0.2.11"
|
ab_glyph = "0.2.11"
|
||||||
ahash = { version = "0.8", default-features = false, features = ["std"] }
|
ahash = "0.8"
|
||||||
nohash-hasher = "0.2"
|
nohash-hasher = "0.2"
|
||||||
|
|
||||||
#! ### Optional dependencies
|
#! ### Optional dependencies
|
||||||
|
|
Loading…
Reference in a new issue