mirror of
https://github.com/emilk/egui.git
synced 2026-06-28 07:23:13 -04:00
Remove egui_glium as a backend for eframe (#1357)
eframe will now always use egui_glow as a native backend. Part of https://github.com/emilk/egui/issues/1198
This commit is contained in:
@@ -143,46 +143,6 @@ pub fn start_web(canvas_id: &str, app: Box<dyn epi::App>) -> Result<(), wasm_bin
|
||||
/// }
|
||||
/// ```
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(feature = "egui_glium")]
|
||||
pub fn run_native(app: Box<dyn epi::App>, native_options: epi::NativeOptions) -> ! {
|
||||
egui_glium::run(app, &native_options)
|
||||
}
|
||||
|
||||
/// Call from `fn main` like this:
|
||||
/// ``` no_run
|
||||
/// use eframe::{epi, egui};
|
||||
///
|
||||
/// #[derive(Default)]
|
||||
/// struct MyEguiApp {}
|
||||
///
|
||||
/// impl epi::App for MyEguiApp {
|
||||
/// fn name(&self) -> &str {
|
||||
/// "My egui App"
|
||||
/// }
|
||||
///
|
||||
/// fn update(&mut self, ctx: &egui::Context, frame: &epi::Frame) {
|
||||
/// egui::CentralPanel::default().show(ctx, |ui| {
|
||||
/// ui.heading("Hello World!");
|
||||
/// });
|
||||
/// }
|
||||
///}
|
||||
///
|
||||
/// fn main() {
|
||||
/// let app = MyEguiApp::default();
|
||||
/// let native_options = eframe::NativeOptions::default();
|
||||
/// eframe::run_native(Box::new(app), native_options);
|
||||
/// }
|
||||
/// ```
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(not(feature = "egui_glium"))] // make sure we still compile with `--all-features`
|
||||
#[cfg(feature = "egui_glow")]
|
||||
pub fn run_native(app: Box<dyn epi::App>, native_options: epi::NativeOptions) -> ! {
|
||||
egui_glow::run(app, &native_options)
|
||||
}
|
||||
|
||||
// disabled since we want to be able to compile with `--all-features`
|
||||
// #[cfg(all(feature = "egui_glium", feature = "egui_glow"))]
|
||||
// compile_error!("Enable either egui_glium or egui_glow, not both");
|
||||
|
||||
#[cfg(not(any(feature = "egui_glium", feature = "egui_glow")))]
|
||||
compile_error!("Enable either egui_glium or egui_glow");
|
||||
|
||||
Reference in New Issue
Block a user