From 6e10bee216dd7e0a6e9e1846ee7c1833a0d1ba60 Mon Sep 17 00:00:00 2001 From: Logan McNaughton <848146+loganmc10@users.noreply.github.com> Date: Tue, 11 Mar 2025 09:43:09 +0100 Subject: [PATCH] use glow for egui (#321) * Revert "use GL backend for GUI to avoid conflicts with game window (#287)" This reverts commit 00964f06f061c3a0bd270981ab7ed5bee6600da1. * use glow --- Cargo.lock | 25 +++++++++++-------------- Cargo.toml | 2 +- src/main.rs | 12 ------------ 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8eed09b..61c7522 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -565,9 +565,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.31" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" +checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" dependencies = [ "clap_builder", "clap_derive", @@ -575,9 +575,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.31" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" +checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" dependencies = [ "anstream", "anstyle", @@ -587,9 +587,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.28" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck", "proc-macro2", @@ -927,6 +927,7 @@ dependencies = [ "egui-wgpu", "egui-winit", "egui_glow", + "glow", "glutin", "glutin-winit", "image", @@ -937,7 +938,6 @@ dependencies = [ "objc2-foundation 0.2.2", "parking_lot", "percent-encoding", - "pollster", "profiling", "raw-window-handle", "static_assertions", @@ -945,7 +945,6 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "web-time", - "wgpu", "winapi", "windows-sys 0.59.0", "winit", @@ -1950,9 +1949,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -2640,9 +2639,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.3" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" +checksum = "cde51589ab56b20a6f686b2c68f7a0bd6add753d697abf720d63f8db3ab7b1ad" [[package]] name = "option-ext" @@ -4360,7 +4359,6 @@ dependencies = [ "document-features", "js-sys", "log", - "naga", "parking_lot", "profiling", "raw-window-handle", @@ -4409,7 +4407,6 @@ dependencies = [ "arrayvec", "ash", "bitflags 2.9.0", - "block", "bytemuck", "cfg_aliases", "core-graphics-types", diff --git a/Cargo.toml b/Cargo.toml index 6be305f..1670ba1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ chrono = "0.4" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde-big-array = "0.5" -eframe = { version = "0.31", default-features = false, features = ["wayland", "x11", "wgpu"] } +eframe = { version = "0.31", default-features = false, features = ["wayland", "x11", "glow"] } sha2 = "0.10" rusttype = "0.9" sdl3-sys = { version = "0.4", features = ["build-from-source-static"] } diff --git a/src/main.rs b/src/main.rs index 27fab5c..0446cb8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -169,18 +169,6 @@ async fn main() { handle.join().unwrap(); } else { let options = eframe::NativeOptions { - wgpu_options: eframe::egui_wgpu::WgpuConfiguration { - wgpu_setup: eframe::egui_wgpu::WgpuSetup::CreateNew( - eframe::egui_wgpu::WgpuSetupCreateNew { - instance_descriptor: eframe::egui_wgpu::wgpu::InstanceDescriptor { - backends: eframe::wgpu::Backends::GL, - ..Default::default() - }, - ..Default::default() - }, - ), - ..Default::default() - }, viewport: eframe::egui::ViewportBuilder::default() .with_inner_size([854.0, 480.0]) .with_icon(