Skip to content

Commit 182eba6

Browse files
committed
Remove egui_glium as a backend for eframe
eframe will now always use egui_glow as a native backend. Part of #1198
1 parent 510cef0 commit 182eba6

File tree

5 files changed

+8
-60
lines changed

5 files changed

+8
-60
lines changed

Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ An integration needs to do the following each frame:
160160

161161
### Official integrations
162162

163-
If you're making an app, your best bet is using [`eframe`](https://github.com/emilk/egui/tree/master/eframe), the official egui framework. It lets you write apps that work on both the web and native. `eframe` is just a thin wrapper over `egui_web` and `egui_glium` (see below).
163+
If you're making an app, your best bet is using [`eframe`](https://github.com/emilk/egui/tree/master/eframe), the official egui framework. It lets you write apps that work on both the web and native. `eframe` is just a thin wrapper over `egui_web` and `egui_glow` (see below).
164164

165165
These are the official egui integrations:
166166

167167
* [`egui_glium`](https://github.com/emilk/egui/tree/master/egui_glium) for compiling native apps with [Glium](https://github.com/glium/glium).
168-
* [`egui_glow`](https://github.com/emilk/egui/tree/master/egui_glow) for compiling native apps with [Glow](https://github.com/grovesNL/glow).
169-
* [`egui_web`](https://github.com/emilk/egui/tree/master/egui_web) for making a web app. Compiles to WASM, renders with WebGL. [Click to run the egui demo](https://www.egui.rs/#demo).
168+
* [`egui_glow`](https://github.com/emilk/egui/tree/master/egui_glow) for compiling native apps with [glow](https://github.com/grovesNL/glow).
169+
* [`egui_web`](https://github.com/emilk/egui/tree/master/egui_web) for making a web app. Compiles to WASM, renders with WebGL. [Click to run the egui demo](https://www.egui.rs/#demo). Uses `egui_glow`.
170170
* [`egui-winit`](https://github.com/emilk/egui/tree/master/egui-winit) for integrating with [winit](https://github.com/rust-windowing/winit). `egui-winit` is used by `egui_glium` and `egui_glow`.
171171

172172
### 3rd party integrations

eframe/Cargo.toml

+3-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ all-features = true
2020

2121

2222
[features]
23-
default = ["default_fonts", "egui_glow"]
23+
default = ["default_fonts"]
2424

2525
# If set, egui will use `include_bytes!` to bundle some fonts.
2626
# If you plan on specifying your own fonts you may disable this feature.
@@ -49,18 +49,13 @@ epi = { version = "0.17.0", path = "../epi" }
4949

5050
# native:
5151
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
52-
egui-winit = { version = "0.17.0", path = "../egui-winit", default-features = false }
53-
egui_glium = { version = "0.17.0", path = "../egui_glium", optional = true, default-features = false, features = [
54-
"clipboard",
55-
"epi",
56-
"links",
57-
] }
58-
egui_glow = { version = "0.17.0", path = "../egui_glow", optional = true, default-features = false, features = [
52+
egui_glow = { version = "0.17.0", path = "../egui_glow", default-features = false, features = [
5953
"clipboard",
6054
"epi",
6155
"links",
6256
"winit",
6357
] }
58+
egui-winit = { version = "0.17.0", path = "../egui-winit", default-features = false }
6459

6560
# web:
6661
[target.'cfg(target_arch = "wasm32")'.dependencies]

eframe/README.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For how to use `egui`, see [the egui docs](https://docs.rs/egui).
1818

1919
`eframe` is a very thin crate that re-exports [`egui`](https://github.com/emilk/egui) and[`epi`](https://github.com/emilk/egui/tree/master/epi) with thin wrappers over the backends.
2020

21-
`eframe` uses [`egui_web`](https://github.com/emilk/egui/tree/master/egui_web) for web and [`egui_glium`](https://github.com/emilk/egui/tree/master/egui_glium) or [`egui_glow`](https://github.com/emilk/egui/tree/master/egui_glow) for native.
21+
`eframe` uses [`egui_web`](https://github.com/emilk/egui/tree/master/egui_web) for web and [`egui_glow`](https://github.com/emilk/egui/tree/master/egui_glow) for native.
2222

2323
To use on Linux, first run:
2424

@@ -28,13 +28,7 @@ sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev lib
2828

2929

3030
## Alternatives
31-
The default native backend for `eframe` is currently [`egui_glow`](https://github.com/emilk/egui/tree/master/egui_glow), but you can switch to the previous [`egui_glium`](https://github.com/emilk/egui/tree/master/egui_glium) backend by putting this in your `Cargo.toml`:
32-
33-
``` toml
34-
eframe = { version = "*", default-features = false, features = ["default_fonts", "egui_glium"] }
35-
```
36-
37-
`eframe` is not the only way to write an app using `egui`! You can also try [`egui-miniquad`](https://github.com/not-fl3/egui-miniquad) and [`egui_sdl2_gl`](https://github.com/ArjunNair/egui_sdl2_gl).
31+
`eframe` is not the only way to write an app using `egui`! You can also try [`egui-miniquad`](https://github.com/not-fl3/egui-miniquad), [`bevy_egui`](https://github.com/mvlabat/bevy_egui), [`egui_sdl2_gl`](https://github.com/ArjunNair/egui_sdl2_gl), and others.
3832

3933

4034
## Companion crates

eframe/src/lib.rs

-40
Original file line numberDiff line numberDiff line change
@@ -143,46 +143,6 @@ pub fn start_web(canvas_id: &str, app: Box<dyn epi::App>) -> Result<(), wasm_bin
143143
/// }
144144
/// ```
145145
#[cfg(not(target_arch = "wasm32"))]
146-
#[cfg(feature = "egui_glium")]
147-
pub fn run_native(app: Box<dyn epi::App>, native_options: epi::NativeOptions) -> ! {
148-
egui_glium::run(app, &native_options)
149-
}
150-
151-
/// Call from `fn main` like this:
152-
/// ``` no_run
153-
/// use eframe::{epi, egui};
154-
///
155-
/// #[derive(Default)]
156-
/// struct MyEguiApp {}
157-
///
158-
/// impl epi::App for MyEguiApp {
159-
/// fn name(&self) -> &str {
160-
/// "My egui App"
161-
/// }
162-
///
163-
/// fn update(&mut self, ctx: &egui::Context, frame: &epi::Frame) {
164-
/// egui::CentralPanel::default().show(ctx, |ui| {
165-
/// ui.heading("Hello World!");
166-
/// });
167-
/// }
168-
///}
169-
///
170-
/// fn main() {
171-
/// let app = MyEguiApp::default();
172-
/// let native_options = eframe::NativeOptions::default();
173-
/// eframe::run_native(Box::new(app), native_options);
174-
/// }
175-
/// ```
176-
#[cfg(not(target_arch = "wasm32"))]
177-
#[cfg(not(feature = "egui_glium"))] // make sure we still compile with `--all-features`
178-
#[cfg(feature = "egui_glow")]
179146
pub fn run_native(app: Box<dyn epi::App>, native_options: epi::NativeOptions) -> ! {
180147
egui_glow::run(app, &native_options)
181148
}
182-
183-
// disabled since we want to be able to compile with `--all-features`
184-
// #[cfg(all(feature = "egui_glium", feature = "egui_glow"))]
185-
// compile_error!("Enable either egui_glium or egui_glow, not both");
186-
187-
#[cfg(not(any(feature = "egui_glium", feature = "egui_glow")))]
188-
compile_error!("Enable either egui_glium or egui_glow");

0 commit comments

Comments
 (0)