
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>
23 lines
604 B
Rust
23 lines
604 B
Rust
//! Demo app for egui
|
|
|
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
|
|
|
// When compiling natively:
|
|
fn main() {
|
|
// Log to stdout (if you run with `RUST_LOG=debug`).
|
|
tracing_subscriber::fmt::init();
|
|
|
|
let options = eframe::NativeOptions {
|
|
drag_and_drop_support: true,
|
|
|
|
#[cfg(feature = "wgpu")]
|
|
renderer: eframe::Renderer::Wgpu,
|
|
|
|
..Default::default()
|
|
};
|
|
eframe::run_native(
|
|
"egui demo app",
|
|
options,
|
|
Box::new(|cc| Box::new(egui_demo_app::WrapApp::new(cc))),
|
|
);
|
|
}
|