From 31d8e2f0120a1f46a7a243db5adcebefd2bf9316 Mon Sep 17 00:00:00 2001 From: ardocrat Date: Mon, 2 Jun 2025 12:10:41 +0300 Subject: [PATCH] eframe: glow renderer --- Cargo.lock | 525 +--------------------------------------------------- Cargo.toml | 2 +- src/main.rs | 28 +-- 3 files changed, 9 insertions(+), 546 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 13d399b..25f0834 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,96 +18,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" -[[package]] -name = "accesskit" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25ae84c0260bdf5df07796d7cc4882460de26a2b406ec0e6c42461a723b271b" - -[[package]] -name = "accesskit_atspi_common" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bd41de2e54451a8ca0dd95ebf45b54d349d29ebceb7f20be264eee14e3d477" -dependencies = [ - "accesskit", - "accesskit_consumer", - "atspi-common", - "serde", - "thiserror 1.0.69", - "zvariant", -] - -[[package]] -name = "accesskit_consumer" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bfae7c152994a31dc7d99b8eeac7784a919f71d1b306f4b83217e110fd3824c" -dependencies = [ - "accesskit", - "hashbrown 0.15.3", -] - -[[package]] -name = "accesskit_macos" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692dd318ff8a7a0ffda67271c4bd10cf32249656f4e49390db0b26ca92b095f2" -dependencies = [ - "accesskit", - "accesskit_consumer", - "hashbrown 0.15.3", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "accesskit_unix" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f7474c36606d0fe4f438291d667bae7042ea2760f506650ad2366926358fc8" -dependencies = [ - "accesskit", - "accesskit_atspi_common", - "async-channel", - "async-executor", - "async-task", - "atspi", - "futures-lite", - "futures-util", - "serde", - "zbus", -] - -[[package]] -name = "accesskit_windows" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a042b62c9c05bf7b616f015515c17d2813f3ba89978d6f4fc369735d60700a" -dependencies = [ - "accesskit", - "accesskit_consumer", - "hashbrown 0.15.3", - "static_assertions", - "windows 0.61.1", - "windows-core", -] - -[[package]] -name = "accesskit_winit" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1f0d3d13113d8857542a4f8d1a1c24d1dc1527b77aee8426127f4901588708" -dependencies = [ - "accesskit", - "accesskit_macos", - "accesskit_unix", - "accesskit_windows", - "raw-window-handle", - "winit", -] - [[package]] name = "addr2line" version = "0.24.2" @@ -816,56 +726,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atspi" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83247582e7508838caf5f316c00791eee0e15c0bf743e6880585b867e16815c" -dependencies = [ - "atspi-common", - "atspi-connection", - "atspi-proxies", -] - -[[package]] -name = "atspi-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33dfc05e7cdf90988a197803bf24f5788f94f7c94a69efa95683e8ffe76cfdfb" -dependencies = [ - "enumflags2", - "serde", - "static_assertions", - "zbus", - "zbus-lockstep", - "zbus-lockstep-macros", - "zbus_names", - "zvariant", -] - -[[package]] -name = "atspi-connection" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4193d51303d8332304056ae0004714256b46b6635a5c556109b319c0d3784938" -dependencies = [ - "atspi-common", - "atspi-proxies", - "futures-lite", - "zbus", -] - -[[package]] -name = "atspi-proxies" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2eebcb9e7e76f26d0bcfd6f0295e1cd1e6f33bedbc5698a971db8dc43d7751c" -dependencies = [ - "atspi-common", - "serde", - "zbus", -] - [[package]] name = "autocfg" version = "0.1.8" @@ -1024,27 +884,12 @@ dependencies = [ "which", ] -[[package]] -name = "bit-set" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" -dependencies = [ - "bit-vec 0.8.0", -] - [[package]] name = "bit-vec" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" -[[package]] -name = "bit-vec" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" - [[package]] name = "bit_field" version = "0.10.2" @@ -1527,17 +1372,6 @@ dependencies = [ "objc", ] -[[package]] -name = "codespan-reporting" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" -dependencies = [ - "serde", - "termcolor", - "unicode-width 0.2.0", -] - [[package]] name = "color_quant" version = "1.1.0" @@ -1698,7 +1532,7 @@ dependencies = [ "core-foundation-sys 0.7.0", "core-graphics 0.19.2", "libc", - "metal 0.18.0", + "metal", "objc", ] @@ -2502,7 +2336,6 @@ dependencies = [ "bytemuck", "document-features", "egui", - "egui-wgpu", "egui-winit", "egui_glow", "glow", @@ -2516,7 +2349,6 @@ dependencies = [ "objc2-foundation 0.2.2", "parking_lot 0.12.3", "percent-encoding", - "pollster", "profiling", "raw-window-handle", "static_assertions", @@ -2524,7 +2356,6 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "web-time", - "wgpu", "winapi 0.3.9", "windows-sys 0.59.0", "winit", @@ -2535,7 +2366,6 @@ name = "egui" version = "0.31.1" source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ - "accesskit", "ahash", "bitflags 2.9.1", "emath", @@ -2546,31 +2376,11 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "egui-wgpu" -version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" -dependencies = [ - "ahash", - "bytemuck", - "document-features", - "egui", - "epaint", - "log", - "profiling", - "thiserror 1.0.69", - "type-map", - "web-time", - "wgpu", - "winit", -] - [[package]] name = "egui-winit" version = "0.31.1" source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ - "accesskit_winit", "ahash", "arboard", "bytemuck", @@ -2613,7 +2423,6 @@ dependencies = [ "profiling", "wasm-bindgen", "web-sys", - "winit", ] [[package]] @@ -2766,18 +2575,12 @@ dependencies = [ "bytemuck", "ecolor", "emath", - "epaint_default_fonts", "log", "nohash-hasher", "parking_lot 0.12.3", "profiling", ] -[[package]] -name = "epaint_default_fonts" -version = "0.31.1" -source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" - [[package]] name = "equivalent" version = "1.0.2" @@ -3458,7 +3261,6 @@ dependencies = [ "cgl", "dispatch2 0.3.0", "glutin_egl_sys", - "glutin_glx_sys", "glutin_wgl_sys", "libloading", "objc2 0.6.1", @@ -3467,9 +3269,7 @@ dependencies = [ "objc2-foundation 0.3.1", "once_cell", "raw-window-handle", - "wayland-sys", "windows-sys 0.52.0", - "x11-dl", ] [[package]] @@ -3494,16 +3294,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "glutin_glx_sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" -dependencies = [ - "gl_generator", - "x11-dl", -] - [[package]] name = "glutin_wgl_sys" version = "0.6.1" @@ -3638,7 +3428,7 @@ version = "5.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdedcee9e20e0cc8dc1460b37b3951306c774a6aa5788e3f45addc56e60f7fbe" dependencies = [ - "bit-vec 0.6.3", + "bit-vec", "bitflags 1.3.2", "byteorder", "chrono", @@ -4109,7 +3899,6 @@ checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" dependencies = [ "cfg-if 1.0.0", "crunchy", - "num-traits 0.2.19", ] [[package]] @@ -4204,12 +3993,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hexf-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" - [[package]] name = "hkdf" version = "0.11.0" @@ -5515,21 +5298,6 @@ dependencies = [ "objc", ] -[[package]] -name = "metal" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" -dependencies = [ - "bitflags 2.9.1", - "block", - "core-graphics-types", - "foreign-types 0.5.0", - "log", - "objc", - "paste", -] - [[package]] name = "mime" version = "0.3.17" @@ -5694,30 +5462,6 @@ dependencies = [ "nasm-rs", ] -[[package]] -name = "naga" -version = "25.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b977c445f26e49757f9aca3631c3b8b836942cb278d69a92e7b80d3b24da632" -dependencies = [ - "arrayvec 0.7.6", - "bit-set", - "bitflags 2.9.1", - "cfg_aliases", - "codespan-reporting", - "half", - "hashbrown 0.15.3", - "hexf-parse", - "indexmap 2.9.0", - "log", - "num-traits 0.2.19", - "once_cell", - "rustc-hash 1.1.0", - "strum 0.26.3", - "thiserror 2.0.12", - "unicode-ident", -] - [[package]] name = "nanorand" version = "0.7.0" @@ -5913,7 +5657,7 @@ checksum = "21bdd1a21fba66d677559b3e216cdcf23234569853afbf26954d0502c93ff18b" dependencies = [ "nokhwa-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell", - "windows 0.43.0", + "windows", ] [[package]] @@ -7039,7 +6783,7 @@ dependencies = [ "is-terminal", "lazy_static", "term 0.7.0", - "unicode-width 0.1.14", + "unicode-width", ] [[package]] @@ -7180,16 +6924,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" -[[package]] -name = "quick-xml" -version = "0.36.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "quick-xml" version = "0.37.5" @@ -7664,12 +7398,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "renderdoc-sys" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" - [[package]] name = "reqwest" version = "0.10.10" @@ -8789,15 +8517,6 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros 0.26.4", -] - [[package]] name = "strum" version = "0.27.1" @@ -8819,19 +8538,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck 0.5.0", - "proc-macro2 1.0.95", - "quote 1.0.40", - "rustversion", - "syn 2.0.101", -] - [[package]] name = "strum_macros" version = "0.27.1" @@ -8994,15 +8700,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -10727,12 +10424,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" -[[package]] -name = "unicode-width" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" - [[package]] name = "unicode-xid" version = "0.1.0" @@ -11153,7 +10844,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" dependencies = [ "proc-macro2 1.0.95", - "quick-xml 0.37.5", + "quick-xml", "quote 1.0.40", ] @@ -11237,123 +10928,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" -[[package]] -name = "wgpu" -version = "25.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8fb398f119472be4d80bc3647339f56eb63b2a331f6a3d16e25d8144197dd9" -dependencies = [ - "arrayvec 0.7.6", - "bitflags 2.9.1", - "cfg_aliases", - "document-features", - "hashbrown 0.15.3", - "js-sys", - "log", - "naga", - "parking_lot 0.12.3", - "portable-atomic", - "profiling", - "raw-window-handle", - "smallvec", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu-core", - "wgpu-hal", - "wgpu-types", -] - -[[package]] -name = "wgpu-core" -version = "25.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b882196f8368511d613c6aeec80655160db6646aebddf8328879a88d54e500" -dependencies = [ - "arrayvec 0.7.6", - "bit-set", - "bit-vec 0.8.0", - "bitflags 2.9.1", - "cfg_aliases", - "document-features", - "hashbrown 0.15.3", - "indexmap 2.9.0", - "log", - "naga", - "once_cell", - "parking_lot 0.12.3", - "portable-atomic", - "profiling", - "raw-window-handle", - "rustc-hash 1.1.0", - "smallvec", - "thiserror 2.0.12", - "wgpu-core-deps-apple", - "wgpu-core-deps-windows-linux-android", - "wgpu-hal", - "wgpu-types", -] - -[[package]] -name = "wgpu-core-deps-apple" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd488b3239b6b7b185c3b045c39ca6bf8af34467a4c5de4e0b1a564135d093d" -dependencies = [ - "wgpu-hal", -] - -[[package]] -name = "wgpu-core-deps-windows-linux-android" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cba5fb5f7f9c98baa7c889d444f63ace25574833df56f5b817985f641af58e46" -dependencies = [ - "wgpu-hal", -] - -[[package]] -name = "wgpu-hal" -version = "25.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f968767fe4d3d33747bbd1473ccd55bf0f6451f55d733b5597e67b5deab4ad17" -dependencies = [ - "arrayvec 0.7.6", - "bitflags 2.9.1", - "block", - "cfg_aliases", - "core-graphics-types", - "hashbrown 0.15.3", - "libc", - "libloading", - "log", - "metal 0.31.0", - "naga", - "objc", - "parking_lot 0.12.3", - "portable-atomic", - "profiling", - "raw-window-handle", - "renderdoc-sys", - "thiserror 2.0.12", - "wgpu-types", -] - -[[package]] -name = "wgpu-types" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aa49460c2a8ee8edba3fca54325540d904dd85b2e086ada762767e17d06e8bc" -dependencies = [ - "bitflags 2.9.1", - "bytemuck", - "js-sys", - "log", - "thiserror 2.0.12", - "web-sys", -] - [[package]] name = "which" version = "4.4.2" @@ -11430,28 +11004,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows" -version = "0.61.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419" -dependencies = [ - "windows-collections", - "windows-core", - "windows-future", - "windows-link", - "windows-numerics", -] - -[[package]] -name = "windows-collections" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" -dependencies = [ - "windows-core", -] - [[package]] name = "windows-core" version = "0.61.2" @@ -11465,17 +11017,6 @@ dependencies = [ "windows-strings", ] -[[package]] -name = "windows-future" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" -dependencies = [ - "windows-core", - "windows-link", - "windows-threading", -] - [[package]] name = "windows-implement" version = "0.60.0" @@ -11504,16 +11045,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" -[[package]] -name = "windows-numerics" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" -dependencies = [ - "windows-core", - "windows-link", -] - [[package]] name = "windows-result" version = "0.3.4" @@ -11621,15 +11152,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] -[[package]] -name = "windows-threading" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" -dependencies = [ - "windows-link", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -12098,30 +11620,6 @@ dependencies = [ "zvariant", ] -[[package]] -name = "zbus-lockstep" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22426b1bc2aca91de97772506f0655fa373448e6010d79d5d5880915c388409" -dependencies = [ - "zbus_xml", - "zvariant", -] - -[[package]] -name = "zbus-lockstep-macros" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "100ffec29ed51859052f4563061abe35557acb56ba574510571f8398efc70a29" -dependencies = [ - "proc-macro2 1.0.95", - "quote 1.0.40", - "syn 2.0.101", - "zbus-lockstep", - "zbus_xml", - "zvariant", -] - [[package]] name = "zbus_macros" version = "5.7.1" @@ -12149,19 +11647,6 @@ dependencies = [ "zvariant", ] -[[package]] -name = "zbus_xml" -version = "5.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589e9a02bfafb9754bb2340a9e3b38f389772684c63d9637e76b1870377bec29" -dependencies = [ - "quick-xml 0.36.2", - "serde", - "static_assertions", - "zbus_names", - "zvariant", -] - [[package]] name = "zerocopy" version = "0.8.25" diff --git a/Cargo.toml b/Cargo.toml index f30f145..2cc1d50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -141,7 +141,7 @@ nokhwa-mac = { git = "https://github.com/l1npengtul/nokhwa", rev = "612c861ef153 [target.'cfg(not(target_os = "android"))'.dependencies] env_logger = "0.11.3" winit = { version = "0.30.11" } -eframe = { version = "0.31.1", features = ["wgpu", "glow"] } +eframe = { version = "0.31.1", default-features = false, features = ["glow"] } arboard = "3.2.0" rfd = "0.15.0" interprocess = { version = "2.2.1", features = ["tokio"] } diff --git a/src/main.rs b/src/main.rs index ce2b9a0..c856cdc 100755 --- a/src/main.rs +++ b/src/main.rs @@ -134,37 +134,15 @@ fn start_desktop_gui(platform: grim::gui::platform::Desktop) { .with_transparent(true) .with_decorations(is_mac || is_win); - let mut options = eframe::NativeOptions { + let options = eframe::NativeOptions { + renderer: eframe::Renderer::Glow, viewport, ..Default::default() }; - // Use Glow renderer for Windows. - options.renderer = if is_win || is_mac { - eframe::Renderer::Glow - } else { - eframe::Renderer::Wgpu - }; // Start GUI. let app = grim::gui::App::new(platform.clone()); - match grim::start(options.clone(), grim::app_creator(app)) { - Ok(_) => {} - Err(e) => { - if is_win { - panic!("{}", e); - } - // Start with another renderer on error. - options.renderer = eframe::Renderer::Glow; - - let app = grim::gui::App::new(platform); - match grim::start(options, grim::app_creator(app)) { - Ok(_) => {} - Err(e) => { - panic!("{}", e); - } - } - } - } + grim::start(options.clone(), grim::app_creator(app)).unwrap(); } /// Check if application is already running to pass data.