From 1ff2bab1ed86472dee9876d0a9754a395a35c8ab Mon Sep 17 00:00:00 2001 From: Francisco Ayala Le Brun Date: Tue, 7 Nov 2023 15:43:08 +0100 Subject: [PATCH 1/3] Remove egui_glium Moved to https://github.com/fayalalebrun/egui_glium --- crates/egui_glium/CHANGELOG.md | 125 ------ crates/egui_glium/Cargo.toml | 58 --- crates/egui_glium/README.md | 21 - crates/egui_glium/examples/native_texture.rs | 138 ------- crates/egui_glium/examples/pure_glium.rs | 108 ----- crates/egui_glium/src/lib.rs | 100 ----- crates/egui_glium/src/painter.rs | 381 ------------------ .../egui_glium/src/shader/fragment_100es.glsl | 38 -- .../egui_glium/src/shader/fragment_120.glsl | 31 -- .../egui_glium/src/shader/fragment_140.glsl | 32 -- .../egui_glium/src/shader/fragment_300es.glsl | 32 -- .../egui_glium/src/shader/vertex_100es.glsl | 19 - crates/egui_glium/src/shader/vertex_120.glsl | 18 - crates/egui_glium/src/shader/vertex_140.glsl | 18 - .../egui_glium/src/shader/vertex_300es.glsl | 19 - 15 files changed, 1138 deletions(-) delete mode 100644 crates/egui_glium/CHANGELOG.md delete mode 100644 crates/egui_glium/Cargo.toml delete mode 100644 crates/egui_glium/README.md delete mode 100644 crates/egui_glium/examples/native_texture.rs delete mode 100644 crates/egui_glium/examples/pure_glium.rs delete mode 100644 crates/egui_glium/src/lib.rs delete mode 100644 crates/egui_glium/src/painter.rs delete mode 100644 crates/egui_glium/src/shader/fragment_100es.glsl delete mode 100644 crates/egui_glium/src/shader/fragment_120.glsl delete mode 100644 crates/egui_glium/src/shader/fragment_140.glsl delete mode 100644 crates/egui_glium/src/shader/fragment_300es.glsl delete mode 100644 crates/egui_glium/src/shader/vertex_100es.glsl delete mode 100644 crates/egui_glium/src/shader/vertex_120.glsl delete mode 100644 crates/egui_glium/src/shader/vertex_140.glsl delete mode 100644 crates/egui_glium/src/shader/vertex_300es.glsl diff --git a/crates/egui_glium/CHANGELOG.md b/crates/egui_glium/CHANGELOG.md deleted file mode 100644 index c1e98201d55..00000000000 --- a/crates/egui_glium/CHANGELOG.md +++ /dev/null @@ -1,125 +0,0 @@ -# Changelog for egui_glium -All notable changes to the `egui_glium` integration will be noted in this file. - -This file is updated upon each release. -Changes since the last release can be found by running the `scripts/generate_changelog.py` script. - - -## Unreleased -* Remove the `screen_reader` feature ([#2669](https://github.com/emilk/egui/pull/2669)). - - -## 0.20.1 - 2022-12-11 -* Fix [docs.rs](https://docs.rs/egui_glium) build ([#2420](https://github.com/emilk/egui/pull/2420)). - - -## 0.20.0 - 2022-12-08 -* MSRV (Minimum Supported Rust Version) is now `1.65.0` ([#2314](https://github.com/emilk/egui/pull/2314)). - - -## 0.19.0 - 2022-08-20 -* MSRV (Minimum Supported Rust Version) is now `1.61.0` ([#1846](https://github.com/emilk/egui/pull/1846)). - - -## 0.18.0 - 2022-04-30 -* Remove "epi" feature ([#1361](https://github.com/emilk/egui/pull/1361)). -* Remove need for `trait epi::NativeTexture` to use the `fn register_native_texture/replace_native_texture` ([#1361](https://github.com/emilk/egui/pull/1361)). -* MSRV (Minimum Supported Rust Version) is now `1.60.0` ([#1467](https://github.com/emilk/egui/pull/1467)). - - -## 0.17.0 - 2022-02-22 -* `EguiGlium::run` no longer returns the shapes to paint, but stores them internally until you call `EguiGlium::paint` ([#1110](https://github.com/emilk/egui/pull/1110)). -* Optimize the painter and texture uploading ([#1110](https://github.com/emilk/egui/pull/1110)). -* Automatically detect and apply dark or light mode from system ([#1045](https://github.com/emilk/egui/pull/1045)). - - -## 0.16.0 - 2021-12-29 -* Simplified `EguiGlium` interface ([#871](https://github.com/emilk/egui/pull/871)). -* Removed `EguiGlium::is_quit_event` ([#881](https://github.com/emilk/egui/pull/881)). -* Updated `glium` to 0.31 ([#930](https://github.com/emilk/egui/pull/930)). -* Changed the `Painter` interface slightly ([#999](https://github.com/emilk/egui/pull/999)). - - -## 0.15.0 - 2021-10-24 -* Remove "http" feature (use https://github.com/emilk/ehttp instead!). -* Implement `epi::NativeTexture` trait for the glium painter. -* Deprecate 'Painter::register_glium_texture'. -* Increase scroll speed. -* Restore window position on startup without flickering. -* A lot of the code has been moved to the new library [`egui-winit`](https://github.com/emilk/egui/tree/master/crates/egui-winit). -* Fixed reactive mode on windows. - - -## 0.14.0 - 2021-08-24 -* Fixed native file dialogs hanging (eg. when using [`rfd`](https://github.com/PolyMeilex/rfd)). -* Implement drag-and-dropping files into the application. -* [Fix minimize on Windows](https://github.com/emilk/egui/issues/518). -* Change `drag_and_drop_support` to `false` by default (Windows only). See . -* Don't restore window position on Windows, because the position would sometimes be invalid. - - -## 0.13.1 - 2021-06-24 -* Fixed `http` feature flag and docs - - -## 0.13.0 - 2021-06-24 -* Added `EguiGlium::is_quit_event` to replace `control_flow` argument to `EguiGlium::on_event`. -* [Fix modifier key for zoom with mouse wheel on Mac](https://github.com/emilk/egui/issues/401) -* [Fix stuck modifier keys](https://github.com/emilk/egui/pull/479) - - -## 0.12.0 - 2021-05-10 -* Simplify usage with a new `EguiGlium` wrapper type. - - -## 0.11.0 - 2021-04-05 -* [Position IME candidate window next to text cursor](https://github.com/emilk/egui/pull/258). -* [Register your own glium textures](https://github.com/emilk/egui/pull/226). -* [Fix cursor icon flickering on Windows(https://github.com/emilk/egui/pull/218). - - -## 0.10.0 - 2021-02-28 -* [Add shaders for GLSL 1.2, GLSL ES 1.0 and 3.0](https://github.com/emilk/egui/pull/187) - - now `egui` works well on old hardware which supports OpenGL 2.1 only like Raspberry Pi 1 and Zero. - - -## 0.9.0 - 2021-02-07 -* Nothing new - - -## 0.8.0 - 2021-01-17 -* Fixed a bug where key releases weren't sent to egui -* Fixed `set_window_size` for non-native `pixels_per_point`. - - -## 0.7.0 - 2021-01-04 -* `http` `persistence` and `time` are now optional (and opt-in) features. - - -## 0.6.0 - 2020-12-26 -### Added ⭐ -* `egui_glium` will auto-save your app state every 30 seconds. -* `egui_glium` can now set windows as fixed size (e.g. the user can't resize the window). See `egui::App::is_resizable()`. - -### Changed 🔧 -* `egui_glium` will now save you app state to [a better directory](https://docs.rs/directories-next/2.0.0/directories_next/struct.ProjectDirs.html#method.data_dir). -* `egui_glium::run`: the parameter `app` now has signature `Box` (you need to add `Box::new(app)` to your code). -* Window title is now passed via the `trait` function `egui::App::name()`. - -### Fixed 🐛 -* Serialize window size in logical points instead of physical pixels. -* Window position is now restored on restart. - - -## 0.5.0 - 2020-12-13 -* FileStorage::from_path now takes `Into` instead of `String` - - -## 0.4.0 - 2020-11-28 -Started changelog. Features: - -* Input -* Painting -* Clipboard handling -* Open URL:s -* Simple JSON-backed storage diff --git a/crates/egui_glium/Cargo.toml b/crates/egui_glium/Cargo.toml deleted file mode 100644 index a76cde4e3eb..00000000000 --- a/crates/egui_glium/Cargo.toml +++ /dev/null @@ -1,58 +0,0 @@ -[package] -name = "egui_glium" -version = "0.23.0" -authors = ["Emil Ernerfeldt "] -description = "Bindings for using egui natively using the glium library" -edition = "2021" -rust-version = "1.70" -homepage = "https://github.com/emilk/egui/tree/master/crates/egui_glium" -license = "MIT OR Apache-2.0" -readme = "README.md" -repository = "https://github.com/emilk/egui/tree/master/crates/egui_glium" -categories = ["gui", "game-development"] -keywords = ["glium", "egui", "gui", "gamedev"] -include = [ - "../LICENSE-APACHE", - "../LICENSE-MIT", - "**/*.rs", - "Cargo.toml", - "src/shader/*.glsl", -] - -[package.metadata.docs.rs] -all-features = true - - -[features] -default = ["clipboard", "links"] - -## Enable cut/copy/paste to OS clipboard. -## -## If disabled a clipboard will be simulated so you can still copy/paste within the egui app. -clipboard = ["egui-winit/clipboard"] - -## Enable opening links in a browser when an egui hyperlink is clicked. -links = ["egui-winit/links"] - - -[dependencies] -egui = { version = "0.23.0", path = "../egui", default-features = false, features = [ - "bytemuck", -] } -egui-winit = { version = "0.23.0", path = "../egui-winit", default-features = false } - -ahash = { version = "0.8.1", default-features = false, features = [ - "no-rng", # we don't need DOS-protection, so we let users opt-in to it instead - "std", -] } -bytemuck = "1.7" -glium = "0.32" - -#! ### Optional dependencies -## Enable this when generating docs. -document-features = { version = "0.2", optional = true } - - -[dev-dependencies] -egui_demo_lib = { version = "0.23.0", path = "../egui_demo_lib", default-features = false } -image = { version = "0.24", default-features = false, features = ["png"] } diff --git a/crates/egui_glium/README.md b/crates/egui_glium/README.md deleted file mode 100644 index 1c31de5fa07..00000000000 --- a/crates/egui_glium/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# egui_glium - -[![Latest version](https://img.shields.io/crates/v/egui_glium.svg)](https://crates.io/crates/egui_glium) -[![Documentation](https://docs.rs/egui_glium/badge.svg)](https://docs.rs/egui_glium) -[![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/) -![MIT](https://img.shields.io/badge/license-MIT-blue.svg) -![Apache](https://img.shields.io/badge/license-Apache-blue.svg) - -This crates provides bindings between [`egui`](https://github.com/emilk/egui) and [glium](https://crates.io/crates/glium) which allows you to write GUI code using egui and compile it and run it natively, cross platform. - -To use on Linux, first run: - -``` -sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev -``` - -This crate depends on [`egui-winit`](https://github.com/emilk/egui/tree/master/crates/egui-winit). - - -## DEPRECATED - Looking for new maintainer -This crate is no longer being updated. If you are interested in keeping `egui_glium` updated, then fork it to its own repository, make a PR to the egui repo removing it, and then I will give you access to it on crates.io so you can publish new `egui_glium` crates. diff --git a/crates/egui_glium/examples/native_texture.rs b/crates/egui_glium/examples/native_texture.rs deleted file mode 100644 index eb5a956f464..00000000000 --- a/crates/egui_glium/examples/native_texture.rs +++ /dev/null @@ -1,138 +0,0 @@ -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release - -use glium::glutin; - -fn main() { - let event_loop = glutin::event_loop::EventLoopBuilder::with_user_event().build(); - let display = create_display(&event_loop); - - let mut egui_glium = egui_glium::EguiGlium::new(&display, &event_loop); - - let png_data = include_bytes!("../../../examples/retained_image/src/crab.png"); - let image = load_glium_image(png_data); - let image_size = egui::vec2(image.width as f32, image.height as f32); - // Load to gpu memory - let glium_texture = glium::texture::SrgbTexture2d::new(&display, image).unwrap(); - // Allow us to share the texture with egui: - let glium_texture = std::rc::Rc::new(glium_texture); - // Allocate egui's texture id for GL texture - let texture_id = egui_glium - .painter - .register_native_texture(glium_texture, Default::default()); - // Setup button image size for reasonable image size for button container. - let button_image_size = egui::vec2(32_f32, 32_f32); - - event_loop.run(move |event, _, control_flow| { - let mut redraw = || { - let mut quit = false; - - let repaint_after = egui_glium.run(&display, |egui_ctx| { - egui::SidePanel::left("my_side_panel").show(egui_ctx, |ui| { - if ui - .add(egui::Button::image_and_text( - (texture_id, button_image_size), - "Quit", - )) - .clicked() - { - quit = true; - } - }); - egui::Window::new("NativeTextureDisplay").show(egui_ctx, |ui| { - ui.image(texture_id, image_size); - }); - }); - - *control_flow = if quit { - glutin::event_loop::ControlFlow::Exit - } else if repaint_after.is_zero() { - display.gl_window().window().request_redraw(); - glutin::event_loop::ControlFlow::Poll - } else if let Some(repaint_after_instant) = - std::time::Instant::now().checked_add(repaint_after) - { - glutin::event_loop::ControlFlow::WaitUntil(repaint_after_instant) - } else { - glutin::event_loop::ControlFlow::Wait - }; - - { - use glium::Surface as _; - let mut target = display.draw(); - - let color = egui::Rgba::from_rgb(0.1, 0.3, 0.2); - target.clear_color(color[0], color[1], color[2], color[3]); - - // draw things behind egui here - - egui_glium.paint(&display, &mut target); - - // draw things on top of egui here - - target.finish().unwrap(); - } - }; - - match event { - // Platform-dependent event handlers to workaround a winit bug - // See: https://github.com/rust-windowing/winit/issues/987 - // See: https://github.com/rust-windowing/winit/issues/1619 - glutin::event::Event::RedrawEventsCleared if cfg!(target_os = "windows") => redraw(), - glutin::event::Event::RedrawRequested(_) if !cfg!(target_os = "windows") => redraw(), - - glutin::event::Event::WindowEvent { event, .. } => { - use glutin::event::WindowEvent; - if matches!(event, WindowEvent::CloseRequested | WindowEvent::Destroyed) { - *control_flow = glutin::event_loop::ControlFlow::Exit; - } - - let event_response = egui_glium.on_event(&event); - - if event_response.repaint { - display.gl_window().window().request_redraw(); - } - } - glutin::event::Event::NewEvents(glutin::event::StartCause::ResumeTimeReached { - .. - }) => { - display.gl_window().window().request_redraw(); - } - - _ => (), - } - }); -} - -fn create_display(event_loop: &glutin::event_loop::EventLoop<()>) -> glium::Display { - let window_builder = glutin::window::WindowBuilder::new() - .with_resizable(true) - .with_inner_size(glutin::dpi::LogicalSize { - width: 800.0, - height: 600.0, - }) - .with_title("egui_glium example"); - - let context_builder = glutin::ContextBuilder::new() - .with_depth_buffer(0) - .with_stencil_buffer(0) - .with_vsync(true); - - glium::Display::new(window_builder, context_builder, event_loop).unwrap() -} - -fn load_glium_image(png_data: &[u8]) -> glium::texture::RawImage2d<'_, u8> { - // Load image using the image crate: - let image = image::load_from_memory(png_data).unwrap().to_rgba8(); - let image_dimensions = image.dimensions(); - - // Premultiply alpha: - let pixels: Vec<_> = image - .into_vec() - .chunks_exact(4) - .map(|p| egui::Color32::from_rgba_unmultiplied(p[0], p[1], p[2], p[3])) - .flat_map(|color| color.to_array()) - .collect(); - - // Convert to glium image: - glium::texture::RawImage2d::from_raw_rgba(pixels, image_dimensions) -} diff --git a/crates/egui_glium/examples/pure_glium.rs b/crates/egui_glium/examples/pure_glium.rs deleted file mode 100644 index 801f7b1457b..00000000000 --- a/crates/egui_glium/examples/pure_glium.rs +++ /dev/null @@ -1,108 +0,0 @@ -//! Example how to use `egui_glium`. - -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release - -use glium::glutin; - -fn main() { - let event_loop = glutin::event_loop::EventLoopBuilder::with_user_event().build(); - let display = create_display(&event_loop); - - let mut egui_glium = egui_glium::EguiGlium::new(&display, &event_loop); - - let mut color_test = egui_demo_lib::ColorTest::default(); - - event_loop.run(move |event, _, control_flow| { - let mut redraw = || { - let mut quit = false; - - let repaint_after = egui_glium.run(&display, |egui_ctx| { - egui::SidePanel::left("my_side_panel").show(egui_ctx, |ui| { - ui.heading("Hello World!"); - if ui.button("Quit").clicked() { - quit = true; - } - }); - - egui::CentralPanel::default().show(egui_ctx, |ui| { - egui::ScrollArea::vertical().show(ui, |ui| { - color_test.ui(ui); - }); - }); - }); - - *control_flow = if quit { - glutin::event_loop::ControlFlow::Exit - } else if repaint_after.is_zero() { - display.gl_window().window().request_redraw(); - glutin::event_loop::ControlFlow::Poll - } else if let Some(repaint_after_instant) = - std::time::Instant::now().checked_add(repaint_after) - { - glutin::event_loop::ControlFlow::WaitUntil(repaint_after_instant) - } else { - glutin::event_loop::ControlFlow::Wait - }; - - { - use glium::Surface as _; - let mut target = display.draw(); - - let color = egui::Rgba::from_rgb(0.1, 0.3, 0.2); - target.clear_color(color[0], color[1], color[2], color[3]); - - // draw things behind egui here - - egui_glium.paint(&display, &mut target); - - // draw things on top of egui here - - target.finish().unwrap(); - } - }; - - match event { - // Platform-dependent event handlers to workaround a winit bug - // See: https://github.com/rust-windowing/winit/issues/987 - // See: https://github.com/rust-windowing/winit/issues/1619 - glutin::event::Event::RedrawEventsCleared if cfg!(target_os = "windows") => redraw(), - glutin::event::Event::RedrawRequested(_) if !cfg!(target_os = "windows") => redraw(), - - glutin::event::Event::WindowEvent { event, .. } => { - use glutin::event::WindowEvent; - if matches!(event, WindowEvent::CloseRequested | WindowEvent::Destroyed) { - *control_flow = glutin::event_loop::ControlFlow::Exit; - } - - let event_response = egui_glium.on_event(&event); - - if event_response.repaint { - display.gl_window().window().request_redraw(); - } - } - glutin::event::Event::NewEvents(glutin::event::StartCause::ResumeTimeReached { - .. - }) => { - display.gl_window().window().request_redraw(); - } - _ => (), - } - }); -} - -fn create_display(event_loop: &glutin::event_loop::EventLoop<()>) -> glium::Display { - let window_builder = glutin::window::WindowBuilder::new() - .with_resizable(true) - .with_inner_size(glutin::dpi::LogicalSize { - width: 800.0, - height: 600.0, - }) - .with_title("egui_glium example"); - - let context_builder = glutin::ContextBuilder::new() - .with_depth_buffer(0) - .with_stencil_buffer(0) - .with_vsync(true); - - glium::Display::new(window_builder, context_builder, event_loop).unwrap() -} diff --git a/crates/egui_glium/src/lib.rs b/crates/egui_glium/src/lib.rs deleted file mode 100644 index da60637dcb6..00000000000 --- a/crates/egui_glium/src/lib.rs +++ /dev/null @@ -1,100 +0,0 @@ -//! [`egui`] bindings for [`glium`](https://github.com/glium/glium). -//! -//! The main type you want to use is [`EguiGlium`]. -//! -//! If you are writing an app, you may want to look at [`eframe`](https://docs.rs/eframe) instead. -//! -//! ## Feature flags -#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] -//! - -#![allow(clippy::float_cmp)] -#![allow(clippy::manual_range_contains)] -#![forbid(unsafe_code)] - -mod painter; -pub use painter::Painter; - -pub use egui_winit; - -use egui_winit::winit::event_loop::EventLoopWindowTarget; -pub use egui_winit::EventResponse; - -// ---------------------------------------------------------------------------- - -/// Convenience wrapper for using [`egui`] from a [`glium`] app. -pub struct EguiGlium { - pub egui_ctx: egui::Context, - pub egui_winit: egui_winit::State, - pub painter: crate::Painter, - - shapes: Vec, - textures_delta: egui::TexturesDelta, -} - -impl EguiGlium { - pub fn new(display: &glium::Display, event_loop: &EventLoopWindowTarget) -> Self { - let painter = crate::Painter::new(display); - - let mut egui_winit = egui_winit::State::new(event_loop); - egui_winit.set_max_texture_side(painter.max_texture_side()); - let pixels_per_point = display.gl_window().window().scale_factor() as f32; - egui_winit.set_pixels_per_point(pixels_per_point); - - Self { - egui_ctx: Default::default(), - egui_winit, - painter, - shapes: Default::default(), - textures_delta: Default::default(), - } - } - - pub fn on_event(&mut self, event: &glium::glutin::event::WindowEvent<'_>) -> EventResponse { - self.egui_winit.on_event(&self.egui_ctx, event) - } - - /// Returns `true` if egui requests a repaint. - /// - /// Call [`Self::paint`] later to paint. - pub fn run( - &mut self, - display: &glium::Display, - run_ui: impl FnMut(&egui::Context), - ) -> std::time::Duration { - let raw_input = self - .egui_winit - .take_egui_input(display.gl_window().window()); - let egui::FullOutput { - platform_output, - repaint_after, - textures_delta, - shapes, - } = self.egui_ctx.run(raw_input, run_ui); - - self.egui_winit.handle_platform_output( - display.gl_window().window(), - &self.egui_ctx, - platform_output, - ); - - self.shapes = shapes; - self.textures_delta.append(textures_delta); - - repaint_after - } - - /// Paint the results of the last call to [`Self::run`]. - pub fn paint(&mut self, display: &glium::Display, target: &mut T) { - let shapes = std::mem::take(&mut self.shapes); - let textures_delta = std::mem::take(&mut self.textures_delta); - let clipped_primitives = self.egui_ctx.tessellate(shapes); - self.painter.paint_and_update_textures( - display, - target, - self.egui_ctx.pixels_per_point(), - &clipped_primitives, - &textures_delta, - ); - } -} diff --git a/crates/egui_glium/src/painter.rs b/crates/egui_glium/src/painter.rs deleted file mode 100644 index 39da163b56e..00000000000 --- a/crates/egui_glium/src/painter.rs +++ /dev/null @@ -1,381 +0,0 @@ -#![allow(deprecated)] // legacy implement_vertex macro -#![allow(semicolon_in_expressions_from_macros)] // glium::program! macro - -use egui::{ - epaint::{textures::TextureFilter, Primitive}, - TextureOptions, -}; - -use { - egui::{emath::Rect, epaint::Mesh}, - glium::{ - implement_vertex, - index::PrimitiveType, - texture::{self, srgb_texture2d::SrgbTexture2d}, - uniform, - uniforms::{MagnifySamplerFilter, MinifySamplerFilter, SamplerWrapFunction}, - }, - std::rc::Rc, -}; - -pub struct Painter { - max_texture_side: usize, - program: glium::Program, - - textures: ahash::HashMap, - - /// [`egui::TextureId::User`] index - next_native_tex_id: u64, -} - -fn create_program( - facade: &dyn glium::backend::Facade, - vertex_shader: &str, - fragment_shader: &str, -) -> glium::program::Program { - let input = glium::program::ProgramCreationInput::SourceCode { - vertex_shader, - tessellation_control_shader: None, - tessellation_evaluation_shader: None, - geometry_shader: None, - fragment_shader, - transform_feedback_varyings: None, - outputs_srgb: true, - uses_point_size: false, - }; - - glium::program::Program::new(facade, input) - .unwrap_or_else(|err| panic!("Failed to compile shader: {}", err)) -} - -impl Painter { - pub fn new(facade: &dyn glium::backend::Facade) -> Painter { - use glium::CapabilitiesSource as _; - let max_texture_side = facade.get_capabilities().max_texture_size as _; - - let program = if facade - .get_context() - .is_glsl_version_supported(&glium::Version(glium::Api::Gl, 1, 4)) - { - eprintln!("Using GL 1.4"); - create_program( - facade, - include_str!("shader/vertex_140.glsl"), - include_str!("shader/fragment_140.glsl"), - ) - } else if facade - .get_context() - .is_glsl_version_supported(&glium::Version(glium::Api::Gl, 1, 2)) - { - eprintln!("Using GL 1.2"); - create_program( - facade, - include_str!("shader/vertex_120.glsl"), - include_str!("shader/fragment_120.glsl"), - ) - } else if facade - .get_context() - .is_glsl_version_supported(&glium::Version(glium::Api::GlEs, 3, 0)) - { - eprintln!("Using GL ES 3.0"); - create_program( - facade, - include_str!("shader/vertex_300es.glsl"), - include_str!("shader/fragment_300es.glsl"), - ) - } else if facade - .get_context() - .is_glsl_version_supported(&glium::Version(glium::Api::GlEs, 1, 0)) - { - eprintln!("Using GL ES 1.0"); - create_program( - facade, - include_str!("shader/vertex_100es.glsl"), - include_str!("shader/fragment_100es.glsl"), - ) - } else { - panic!( - "Failed to find a compatible shader for OpenGL version {:?}", - facade.get_version() - ) - }; - - Painter { - max_texture_side, - program, - textures: Default::default(), - next_native_tex_id: 0, - } - } - - pub fn max_texture_side(&self) -> usize { - self.max_texture_side - } - - pub fn paint_and_update_textures( - &mut self, - display: &glium::Display, - target: &mut T, - pixels_per_point: f32, - clipped_primitives: &[egui::ClippedPrimitive], - textures_delta: &egui::TexturesDelta, - ) { - for (id, image_delta) in &textures_delta.set { - self.set_texture(display, *id, image_delta); - } - - self.paint_primitives(display, target, pixels_per_point, clipped_primitives); - - for &id in &textures_delta.free { - self.free_texture(id); - } - } - - /// Main entry-point for painting a frame. - /// You should call `target.clear_color(..)` before - /// and `target.finish()` after this. - pub fn paint_primitives( - &mut self, - display: &glium::Display, - target: &mut T, - pixels_per_point: f32, - clipped_primitives: &[egui::ClippedPrimitive], - ) { - for egui::ClippedPrimitive { - clip_rect, - primitive, - } in clipped_primitives - { - match primitive { - Primitive::Mesh(mesh) => { - self.paint_mesh(target, display, pixels_per_point, clip_rect, mesh); - } - Primitive::Callback(_) => { - panic!("Custom rendering callbacks are not implemented in egui_glium"); - } - } - } - } - - #[inline(never)] // Easier profiling - fn paint_mesh( - &mut self, - target: &mut T, - display: &glium::Display, - pixels_per_point: f32, - clip_rect: &Rect, - mesh: &Mesh, - ) { - debug_assert!(mesh.is_valid()); - - let vertex_buffer = { - #[repr(C)] - #[derive(Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] - struct Vertex { - a_pos: [f32; 2], - a_tc: [f32; 2], - a_srgba: [u8; 4], - } - implement_vertex!(Vertex, a_pos, a_tc, a_srgba); - - let vertices: &[Vertex] = bytemuck::cast_slice(&mesh.vertices); - - // TODO(emilk): we should probably reuse the [`VertexBuffer`] instead of allocating a new one each frame. - glium::VertexBuffer::new(display, vertices).unwrap() - }; - - // TODO(emilk): we should probably reuse the [`IndexBuffer`] instead of allocating a new one each frame. - let index_buffer = - glium::IndexBuffer::new(display, PrimitiveType::TrianglesList, &mesh.indices).unwrap(); - - let (width_in_pixels, height_in_pixels) = display.get_framebuffer_dimensions(); - let width_in_points = width_in_pixels as f32 / pixels_per_point; - let height_in_points = height_in_pixels as f32 / pixels_per_point; - - if let Some(texture) = self.texture(mesh.texture_id) { - // The texture coordinates for text are so that both nearest and linear should work with the egui font texture. - let mag_filter = match texture.options.magnification { - TextureFilter::Nearest => MagnifySamplerFilter::Nearest, - TextureFilter::Linear => MagnifySamplerFilter::Linear, - }; - let min_filter = match texture.options.minification { - TextureFilter::Nearest => MinifySamplerFilter::Nearest, - TextureFilter::Linear => MinifySamplerFilter::Linear, - }; - - let sampler = texture - .glium_texture - .sampled() - .magnify_filter(mag_filter) - .minify_filter(min_filter) - .wrap_function(SamplerWrapFunction::Clamp); - - let uniforms = uniform! { - u_screen_size: [width_in_points, height_in_points], - u_sampler: sampler, - }; - - // egui outputs colors with premultiplied alpha: - let color_blend_func = glium::BlendingFunction::Addition { - source: glium::LinearBlendingFactor::One, - destination: glium::LinearBlendingFactor::OneMinusSourceAlpha, - }; - - // Less important, but this is technically the correct alpha blend function - // when you want to make use of the framebuffer alpha (for screenshots, compositing, etc). - let alpha_blend_func = glium::BlendingFunction::Addition { - source: glium::LinearBlendingFactor::OneMinusDestinationAlpha, - destination: glium::LinearBlendingFactor::One, - }; - - let blend = glium::Blend { - color: color_blend_func, - alpha: alpha_blend_func, - ..Default::default() - }; - - // egui outputs mesh in both winding orders: - let backface_culling = glium::BackfaceCullingMode::CullingDisabled; - - // Transform clip rect to physical pixels: - let clip_min_x = pixels_per_point * clip_rect.min.x; - let clip_min_y = pixels_per_point * clip_rect.min.y; - let clip_max_x = pixels_per_point * clip_rect.max.x; - let clip_max_y = pixels_per_point * clip_rect.max.y; - - // Make sure clip rect can fit within a `u32`: - let clip_min_x = clip_min_x.clamp(0.0, width_in_pixels as f32); - let clip_min_y = clip_min_y.clamp(0.0, height_in_pixels as f32); - let clip_max_x = clip_max_x.clamp(clip_min_x, width_in_pixels as f32); - let clip_max_y = clip_max_y.clamp(clip_min_y, height_in_pixels as f32); - - let clip_min_x = clip_min_x.round() as u32; - let clip_min_y = clip_min_y.round() as u32; - let clip_max_x = clip_max_x.round() as u32; - let clip_max_y = clip_max_y.round() as u32; - - let params = glium::DrawParameters { - blend, - backface_culling, - scissor: Some(glium::Rect { - left: clip_min_x, - bottom: height_in_pixels - clip_max_y, - width: clip_max_x - clip_min_x, - height: clip_max_y - clip_min_y, - }), - ..Default::default() - }; - - target - .draw( - &vertex_buffer, - &index_buffer, - &self.program, - &uniforms, - ¶ms, - ) - .unwrap(); - } - } - - // ------------------------------------------------------------------------ - - pub fn set_texture( - &mut self, - facade: &dyn glium::backend::Facade, - tex_id: egui::TextureId, - delta: &egui::epaint::ImageDelta, - ) { - let pixels: Vec<(u8, u8, u8, u8)> = match &delta.image { - egui::ImageData::Color(image) => { - assert_eq!( - image.width() * image.height(), - image.pixels.len(), - "Mismatch between texture size and texel count" - ); - image.pixels.iter().map(|color| color.to_tuple()).collect() - } - egui::ImageData::Font(image) => image - .srgba_pixels(None) - .map(|color| color.to_tuple()) - .collect(), - }; - let glium_image = glium::texture::RawImage2d { - data: std::borrow::Cow::Owned(pixels), - width: delta.image.width() as _, - height: delta.image.height() as _, - format: glium::texture::ClientFormat::U8U8U8U8, - }; - let format = texture::SrgbFormat::U8U8U8U8; - let mipmaps = texture::MipmapsOption::NoMipmap; - - if let Some(pos) = delta.pos { - // update a sub-region - if let Some(user_texture) = self.textures.get_mut(&tex_id) { - let rect = glium::Rect { - left: pos[0] as _, - bottom: pos[1] as _, - width: glium_image.width, - height: glium_image.height, - }; - user_texture - .glium_texture - .main_level() - .write(rect, glium_image); - - user_texture.options = delta.options; - } - } else { - let gl_texture = - SrgbTexture2d::with_format(facade, glium_image, format, mipmaps).unwrap(); - - let user_texture = EguiTexture::new(gl_texture.into(), delta.options); - self.textures.insert(tex_id, user_texture); - } - } - - pub fn free_texture(&mut self, tex_id: egui::TextureId) { - self.textures.remove(&tex_id); - } - - fn texture(&self, texture_id: egui::TextureId) -> Option<&EguiTexture> { - self.textures.get(&texture_id) - } - - pub fn register_native_texture( - &mut self, - native: Rc, - options: TextureOptions, - ) -> egui::TextureId { - let id = egui::TextureId::User(self.next_native_tex_id); - self.next_native_tex_id += 1; - - let texture = EguiTexture::new(native, options); - self.textures.insert(id, texture); - id - } - - pub fn replace_native_texture( - &mut self, - id: egui::TextureId, - replacing: Rc, - options: TextureOptions, - ) { - let texture = EguiTexture::new(replacing, options); - self.textures.insert(id, texture); - } -} - -struct EguiTexture { - glium_texture: Rc, - options: TextureOptions, -} - -impl EguiTexture { - fn new(glium_texture: Rc, options: TextureOptions) -> Self { - Self { - glium_texture, - options, - } - } -} diff --git a/crates/egui_glium/src/shader/fragment_100es.glsl b/crates/egui_glium/src/shader/fragment_100es.glsl deleted file mode 100644 index 912f47f8fcf..00000000000 --- a/crates/egui_glium/src/shader/fragment_100es.glsl +++ /dev/null @@ -1,38 +0,0 @@ -#version 100 - -precision mediump float; -uniform sampler2D u_sampler; -varying vec4 v_rgba_gamma; // 0-1 gamma sRGBA -varying vec2 v_tc; - -// 0-255 sRGB from 0-1 linear -vec3 srgb_from_linear(vec3 rgb) { - bvec3 cutoff = lessThan(rgb, vec3(0.0031308)); - vec3 lower = rgb * vec3(3294.6); - vec3 higher = vec3(269.025) * pow(rgb, vec3(1.0 / 2.4)) - vec3(14.025); - return mix(higher, lower, vec3(cutoff)); -} - -vec4 srgba_from_linear(vec4 rgba) { - return vec4(srgb_from_linear(rgba.rgb), 255.0 * rgba.a); -} - -// 0-1 linear from 0-255 sRGB -vec3 linear_from_srgb(vec3 srgb) { - bvec3 cutoff = lessThan(srgb, vec3(10.31475)); - vec3 lower = srgb / vec3(3294.6); - vec3 higher = pow((srgb + vec3(14.025)) / vec3(269.025), vec3(2.4)); - return mix(higher, lower, vec3(cutoff)); -} - -vec4 linear_from_srgba(vec4 srgba) { - return vec4(linear_from_srgb(srgba.rgb), srgba.a / 255.0); -} - -void main() { - // WebGL doesn't come with sRGBA textures: - vec4 texture_in_gamma = texture2D(u_sampler, v_tc); - - // Multiply vertex color with texture color (in gamma space). - gl_FragColor = v_rgba_gamma * texture_in_gamma; -} diff --git a/crates/egui_glium/src/shader/fragment_120.glsl b/crates/egui_glium/src/shader/fragment_120.glsl deleted file mode 100644 index e697278d93e..00000000000 --- a/crates/egui_glium/src/shader/fragment_120.glsl +++ /dev/null @@ -1,31 +0,0 @@ -#version 120 - -uniform sampler2D u_sampler; -varying vec4 v_rgba_gamma; // 0-1 gamma sRGBA -varying vec2 v_tc; - -// 0-255 sRGB from 0-1 linear -vec3 srgb_from_linear(vec3 rgb) { - bvec3 cutoff = lessThan(rgb, vec3(0.0031308)); - vec3 lower = rgb * vec3(3294.6); - vec3 higher = vec3(269.025) * pow(rgb, vec3(1.0 / 2.4)) - vec3(14.025); - return mix(higher, lower, vec3(cutoff)); -} - -// 0-255 sRGBA from 0-1 linear -vec4 srgba_from_linear(vec4 rgba) { - return vec4(srgb_from_linear(rgba.rgb), 255.0 * rgba.a); -} - -// 0-1 gamma from 0-1 linear -vec4 gamma_from_linear_rgba(vec4 linear_rgba) { - return vec4(srgb_from_linear(linear_rgba.rgb) / 255.0, linear_rgba.a); -} - -void main() { - // The texture is set up with `SRGB8_ALPHA8` - vec4 texture_in_gamma = gamma_from_linear_rgba(texture2D(u_sampler, v_tc)); - - // Multiply vertex color with texture color (in gamma space). - gl_FragColor = v_rgba_gamma * texture_in_gamma; -} diff --git a/crates/egui_glium/src/shader/fragment_140.glsl b/crates/egui_glium/src/shader/fragment_140.glsl deleted file mode 100644 index 4db357f51ee..00000000000 --- a/crates/egui_glium/src/shader/fragment_140.glsl +++ /dev/null @@ -1,32 +0,0 @@ -#version 140 - -uniform sampler2D u_sampler; -in vec4 v_rgba_gamma; -in vec2 v_tc; -out vec4 f_color; - -// 0-255 sRGB from 0-1 linear -vec3 srgb_from_linear(vec3 rgb) { - bvec3 cutoff = lessThan(rgb, vec3(0.0031308)); - vec3 lower = rgb * vec3(3294.6); - vec3 higher = vec3(269.025) * pow(rgb, vec3(1.0 / 2.4)) - vec3(14.025); - return mix(higher, lower, vec3(cutoff)); -} - -// 0-255 sRGBA from 0-1 linear -vec4 srgba_from_linear(vec4 rgba) { - return vec4(srgb_from_linear(rgba.rgb), 255.0 * rgba.a); -} - -// 0-1 gamma from 0-1 linear -vec4 gamma_from_linear_rgba(vec4 linear_rgba) { - return vec4(srgb_from_linear(linear_rgba.rgb) / 255.0, linear_rgba.a); -} - -void main() { - // The texture is set up with `SRGB8_ALPHA8` - vec4 texture_in_gamma = gamma_from_linear_rgba(texture(u_sampler, v_tc)); - - // Multiply vertex color with texture color (in gamma space). - f_color = v_rgba_gamma * texture_in_gamma; -} diff --git a/crates/egui_glium/src/shader/fragment_300es.glsl b/crates/egui_glium/src/shader/fragment_300es.glsl deleted file mode 100644 index 8d478616560..00000000000 --- a/crates/egui_glium/src/shader/fragment_300es.glsl +++ /dev/null @@ -1,32 +0,0 @@ -#version 300 es - -precision mediump float; -uniform sampler2D u_sampler; -varying vec4 v_rgba_gamma; // 0-1 gamma sRGBA -varying vec2 v_tc; - -// 0-255 sRGB from 0-1 linear -vec3 srgb_from_linear(vec3 rgb) { - bvec3 cutoff = lessThan(rgb, vec3(0.0031308)); - vec3 lower = rgb * vec3(3294.6); - vec3 higher = vec3(269.025) * pow(rgb, vec3(1.0 / 2.4)) - vec3(14.025); - return mix(higher, lower, vec3(cutoff)); -} - -// 0-255 sRGBA from 0-1 linear -vec4 srgba_from_linear(vec4 rgba) { - return vec4(srgb_from_linear(rgba.rgb), 255.0 * rgba.a); -} - -// 0-1 gamma from 0-1 linear -vec4 gamma_from_linear_rgba(vec4 linear_rgba) { - return vec4(srgb_from_linear(linear_rgba.rgb) / 255.0, linear_rgba.a); -} - -void main() { - // The texture is set up with `SRGB8_ALPHA8` - vec4 texture_in_gamma = gamma_from_linear_rgba(texture2D(u_sampler, v_tc)); - - // Multiply vertex color with texture color (in gamma space). - gl_FragColor = v_rgba_gamma * texture_in_gamma; -} diff --git a/crates/egui_glium/src/shader/vertex_100es.glsl b/crates/egui_glium/src/shader/vertex_100es.glsl deleted file mode 100644 index 4cc48136503..00000000000 --- a/crates/egui_glium/src/shader/vertex_100es.glsl +++ /dev/null @@ -1,19 +0,0 @@ -#version 100 - -precision mediump float; -uniform vec2 u_screen_size; -attribute vec2 a_pos; -attribute vec2 a_tc; -attribute vec4 a_srgba; -varying vec4 v_rgba_gamma; // 0-1 gamma sRGBA -varying vec2 v_tc; - -void main() { - gl_Position = vec4( - 2.0 * a_pos.x / u_screen_size.x - 1.0, - 1.0 - 2.0 * a_pos.y / u_screen_size.y, - 0.0, - 1.0); - v_rgba_gamma = a_srgba / 255.0; - v_tc = a_tc; -} diff --git a/crates/egui_glium/src/shader/vertex_120.glsl b/crates/egui_glium/src/shader/vertex_120.glsl deleted file mode 100644 index 2f1a032395f..00000000000 --- a/crates/egui_glium/src/shader/vertex_120.glsl +++ /dev/null @@ -1,18 +0,0 @@ -#version 120 - -uniform vec2 u_screen_size; -attribute vec2 a_pos; -attribute vec4 a_srgba; // 0-255 sRGB -attribute vec2 a_tc; -varying vec4 v_rgba_gamma; // 0-1 gamma sRGBA -varying vec2 v_tc; - -void main() { - gl_Position = vec4( - 2.0 * a_pos.x / u_screen_size.x - 1.0, - 1.0 - 2.0 * a_pos.y / u_screen_size.y, - 0.0, - 1.0); - v_rgba_gamma = a_srgba / 255.0; - v_tc = a_tc; -} diff --git a/crates/egui_glium/src/shader/vertex_140.glsl b/crates/egui_glium/src/shader/vertex_140.glsl deleted file mode 100644 index 03d0a8d7658..00000000000 --- a/crates/egui_glium/src/shader/vertex_140.glsl +++ /dev/null @@ -1,18 +0,0 @@ -#version 140 - -uniform vec2 u_screen_size; -in vec2 a_pos; -in vec4 a_srgba; // 0-255 sRGB -in vec2 a_tc; -out vec4 v_rgba_gamma; -out vec2 v_tc; - -void main() { - gl_Position = vec4( - 2.0 * a_pos.x / u_screen_size.x - 1.0, - 1.0 - 2.0 * a_pos.y / u_screen_size.y, - 0.0, - 1.0); - v_rgba_gamma = a_srgba / 255.0; - v_tc = a_tc; -} diff --git a/crates/egui_glium/src/shader/vertex_300es.glsl b/crates/egui_glium/src/shader/vertex_300es.glsl deleted file mode 100644 index 60fdac1c021..00000000000 --- a/crates/egui_glium/src/shader/vertex_300es.glsl +++ /dev/null @@ -1,19 +0,0 @@ -#version 300 es - -precision mediump float; -uniform vec2 u_screen_size; -attribute vec2 a_pos; -attribute vec2 a_tc; -attribute vec4 a_srgba; -varying vec4 v_rgba_gamma; // 0-1 gamma sRGBA -varying vec2 v_tc; - -void main() { - gl_Position = vec4( - 2.0 * a_pos.x / u_screen_size.x - 1.0, - 1.0 - 2.0 * a_pos.y / u_screen_size.y, - 0.0, - 1.0); - v_rgba_gamma = a_srgba / 255.0; - v_tc = a_tc; -} From a5aa5842769deecb122f4b55f637ddcca11e5a3c Mon Sep 17 00:00:00 2001 From: Francisco Ayala Le Brun Date: Fri, 10 Nov 2023 14:25:59 +0100 Subject: [PATCH 2/3] Remove mentions of `egui_glium` --- ARCHITECTURE.md | 5 +---- CHANGELOG.md | 2 +- README.md | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index d3f6e10e7f9..c9f314f7d60 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -5,7 +5,7 @@ Also see [`CONTRIBUTING.md`](CONTRIBUTING.md) for what to do before opening a PR ## Crate overview -The crates in this repository are: `egui, emath, epaint, egui_extras, egui_plot, egui-winit, egui_glium, egui_glow, egui_demo_lib, egui_demo_app`. +The crates in this repository are: `egui, emath, epaint, egui_extras, egui_plot, egui-winit, egui_glow, egui_demo_lib, egui_demo_app`. ### `egui`: The main GUI library. Example code: `if ui.button("Click me").clicked() { … }` @@ -32,9 +32,6 @@ This crates provides bindings between [`egui`](https://github.com/emilk/egui) an The library translates winit events to egui, handled copy/paste, updates the cursor, open links clicked in egui, etc. -### `egui_glium` -Puts an egui app inside a native window on your laptop. Paints the triangles that egui outputs using [glium](https://github.com/glium/glium). - ### `egui_glow` Puts an egui app inside a native window on your laptop. Paints the triangles that egui outputs using [glow](https://github.com/grovesNL/glow). diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e4da41862c..9e6d0447176 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # egui changelog All notable changes to the `egui` crate will be documented in this file. -NOTE: [`epaint`](crates/epaint/CHANGELOG.md), [`egui_plot`](crates/egui_plot/CHANGELOG.md), [`eframe`](crates/eframe/CHANGELOG.md), [`egui-winit`](crates/egui-winit/CHANGELOG.md), [`egui_glium`](crates/egui_glium/CHANGELOG.md), [`egui_glow`](crates/egui_glow/CHANGELOG.md) and [`egui-wgpu`](crates/egui-wgpu/CHANGELOG.md) have their own changelogs! +NOTE: [`epaint`](crates/epaint/CHANGELOG.md), [`egui_plot`](crates/egui_plot/CHANGELOG.md), [`eframe`](crates/eframe/CHANGELOG.md), [`egui-winit`](crates/egui-winit/CHANGELOG.md), [`egui_glow`](crates/egui_glow/CHANGELOG.md) and [`egui-wgpu`](crates/egui-wgpu/CHANGELOG.md) have their own changelogs! This file is updated upon each release. Changes since the last release can be found by running the `scripts/generate_changelog.py` script. diff --git a/README.md b/README.md index 520304b14b7..363389dd704 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,6 @@ These are the official egui integrations: * [`egui_glow`](https://github.com/emilk/egui/tree/master/crates/egui_glow) for rendering egui with [glow](https://github.com/grovesNL/glow) on native and web, and for making native apps. * [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu) for [wgpu](https://crates.io/crates/wgpu) (WebGPU API). * [`egui-winit`](https://github.com/emilk/egui/tree/master/crates/egui-winit) for integrating with [winit](https://github.com/rust-windowing/winit). -* [`egui_glium`](https://github.com/emilk/egui/tree/master/crates/egui_glium) for compiling native apps with [Glium](https://github.com/glium/glium) (DEPRECATED - looking for new maintainer). ### 3rd party integrations @@ -227,6 +226,7 @@ These are the official egui integrations: * [`egui_skia`](https://github.com/lucasmerlin/egui_skia) for [skia](https://github.com/rust-skia/rust-skia/tree/master/skia-safe). * [`smithay-egui`](https://github.com/Smithay/smithay-egui) for [smithay](https://github.com/Smithay/smithay/). * [`tauri-egui`](https://github.com/tauri-apps/tauri-egui) for [tauri](https://github.com/tauri-apps/tauri). +* [`egui_glium`](https://github.com/fayalalebrun/egui_glium) for compiling native apps with [Glium](https://github.com/glium/glium) Missing an integration for the thing you're working on? Create one, it's easy! @@ -341,7 +341,6 @@ You can also render your 3D scene to a texture and display it using [`ui.image( Examples: * Using [`egui-miniquad`]( https://github.com/not-fl3/egui-miniquad): https://github.com/not-fl3/egui-miniquad/blob/master/examples/render_to_egui_image.rs -* Using [`egui_glium`](https://github.com/emilk/egui/tree/master/crates/egui_glium): . ## Other From 941743d00808200ce6b7198cf93339839553b0f0 Mon Sep 17 00:00:00 2001 From: Francisco Ayala Le Brun Date: Sat, 11 Nov 2023 11:38:19 +0100 Subject: [PATCH 3/3] Fix integration ordering --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 363389dd704..59d63e16579 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,7 @@ These are the official egui integrations: * [`amethyst_egui`](https://github.com/jgraef/amethyst_egui) for [the Amethyst game engine](https://amethyst.rs/). * [`bevy_egui`](https://github.com/mvlabat/bevy_egui) for [the Bevy game engine](https://bevyengine.org/). * [`egui_glfw_gl`](https://github.com/cohaereo/egui_glfw_gl) for [GLFW](https://crates.io/crates/glfw). +* [`egui_glium`](https://github.com/fayalalebrun/egui_glium) for compiling native apps with [Glium](https://github.com/glium/glium). * [`egui-glutin-gl`](https://github.com/h3r2tic/egui-glutin-gl/) for [glutin](https://crates.io/crates/glutin). * [`egui_sdl2_gl`](https://crates.io/crates/egui_sdl2_gl) for [SDL2](https://crates.io/crates/sdl2). * [`egui_sdl2_platform`](https://github.com/ComLarsic/egui_sdl2_platform) for [SDL2](https://crates.io/crates/sdl2). @@ -226,7 +227,6 @@ These are the official egui integrations: * [`egui_skia`](https://github.com/lucasmerlin/egui_skia) for [skia](https://github.com/rust-skia/rust-skia/tree/master/skia-safe). * [`smithay-egui`](https://github.com/Smithay/smithay-egui) for [smithay](https://github.com/Smithay/smithay/). * [`tauri-egui`](https://github.com/tauri-apps/tauri-egui) for [tauri](https://github.com/tauri-apps/tauri). -* [`egui_glium`](https://github.com/fayalalebrun/egui_glium) for compiling native apps with [Glium](https://github.com/glium/glium) Missing an integration for the thing you're working on? Create one, it's easy!