1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Disable custom 3D painting example in the egui demo app for Es100 (#1945)

Closes https://github.com/emilk/egui/issues/1944
This commit is contained in:
Emil Ernerfeldt
2022-08-20 19:54:18 +02:00
committed by GitHub
parent 97ce103209
commit bd5250f85d
9 changed files with 68 additions and 36 deletions

View File

@@ -10,10 +10,10 @@ pub struct Custom3d {
}
impl Custom3d {
pub fn new<'a>(cc: &'a eframe::CreationContext<'a>) -> Self {
pub fn new<'a>(cc: &'a eframe::CreationContext<'a>) -> Option<Self> {
// Get the WGPU render state from the eframe creation context. This can also be retrieved
// from `eframe::Frame` when you don't have a `CreationContext` available.
let wgpu_render_state = cc.wgpu_render_state.as_ref().expect("WGPU enabled");
let wgpu_render_state = cc.wgpu_render_state.as_ref()?;
let device = &wgpu_render_state.device;
@@ -91,7 +91,7 @@ impl Custom3d {
uniform_buffer,
});
Self { angle: 0.0 }
Some(Self { angle: 0.0 })
}
}