2020-11-17 22:24:14 +00:00
|
|
|
#![forbid(unsafe_code)]
|
2020-12-18 21:19:56 +00:00
|
|
|
#![cfg_attr(not(debug_assertions), deny(warnings))] // Forbid warnings in release builds
|
2020-07-23 10:01:48 +00:00
|
|
|
#![warn(clippy::all)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let title = "Egui glium demo";
|
2020-10-19 18:25:05 +00:00
|
|
|
|
|
|
|
// Persist app state to file:
|
2020-12-10 17:35:48 +00:00
|
|
|
let storage = egui_glium::storage::FileStorage::from_path(".egui_demo_glium.json");
|
2020-10-19 18:25:05 +00:00
|
|
|
|
|
|
|
// Alternative: store nowhere
|
|
|
|
// let storage = egui::app::DummyStorage::default();
|
|
|
|
|
2020-07-23 16:54:16 +00:00
|
|
|
let app: egui::DemoApp = egui::app::get_value(&storage, egui::app::APP_KEY).unwrap_or_default();
|
2020-12-14 10:24:37 +00:00
|
|
|
egui_glium::run(title, Box::new(storage), Box::new(app));
|
2020-07-23 10:01:48 +00:00
|
|
|
}
|