Add egui_wgpu crate (#1564)
Based on https://github.com/hasenbanck/egui_wgpu_backend `egui-wgpu` is now an official backend for `eframe` (opt-in). Use the `wgpu` feature flag on `eframe` and the `NativeOptions::renderer` settings to pick it. Co-authored-by: Nils Hasenbanck <nils@hasenbanck.de> Co-authored-by: Sven Niederberger <niederberger@embotech.com> Co-authored-by: Sven Niederberger <73159570+s-nie@users.noreply.github.com>
This commit is contained in:
co-authored by
Nils Hasenbanck
Sven Niederberger
Sven Niederberger
parent
3d52cc8867
commit
931e716b97
@@ -1,5 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use eframe::egui_glow;
|
||||
use egui::mutex::Mutex;
|
||||
use egui_glow::glow;
|
||||
|
||||
@@ -39,8 +40,10 @@ impl eframe::App for Custom3d {
|
||||
});
|
||||
}
|
||||
|
||||
fn on_exit(&mut self, gl: &glow::Context) {
|
||||
self.rotating_triangle.lock().destroy(gl);
|
||||
fn on_exit(&mut self, gl: Option<&glow::Context>) {
|
||||
if let Some(gl) = gl {
|
||||
self.rotating_triangle.lock().destroy(gl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#[cfg(feature = "glow")]
|
||||
mod custom3d;
|
||||
|
||||
mod fractal_clock;
|
||||
|
||||
#[cfg(feature = "http")]
|
||||
mod http_app;
|
||||
|
||||
#[cfg(feature = "glow")]
|
||||
pub use custom3d::Custom3d;
|
||||
|
||||
pub use fractal_clock::FractalClock;
|
||||
|
||||
#[cfg(feature = "http")]
|
||||
pub use http_app::HttpApp;
|
||||
|
||||
Reference in New Issue
Block a user