use glow for egui (#321)

* Revert "use GL backend for GUI to avoid conflicts with game window (#287)"

This reverts commit 00964f06f0.

* use glow
This commit is contained in:
Logan McNaughton 2025-03-11 09:43:09 +01:00 committed by GitHub
parent dff9fc5381
commit 6e10bee216
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 27 deletions

25
Cargo.lock generated
View File

@ -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",

View File

@ -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"] }

View File

@ -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(