From 3d77e3ba8fa465a6e662335660f54e9a307d062e Mon Sep 17 00:00:00 2001 From: Masterchef365 Date: Sat, 20 May 2023 16:09:40 -0700 Subject: [PATCH 1/5] Start updating egui and deps, snowballing --- client/Cargo.lock | 741 +++++++++++++++++------ client/Cargo.toml | 13 +- example_plugins/xyz_reference/src/lib.rs | 42 +- 3 files changed, 588 insertions(+), 208 deletions(-) diff --git a/client/Cargo.lock b/client/Cargo.lock index a8592c1..4d98455 100644 --- a/client/Cargo.lock +++ b/client/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe21446ad43aa56417a767f3e2f3d7c4ca522904de1dd640529a76e9c5c3b33c" +checksum = "5110f1c78cf582855d895ecd0746b653db010cec6d9f5575293f27934d980a39" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -54,11 +54,53 @@ dependencies = [ "memchr", ] +[[package]] +name = "android-activity" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c77a0045eda8b888c76ea473c2b0515ba6f471d318f8927c5c72240937035a6" +dependencies = [ + "android-properties", + "bitflags", + "cc", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" + +[[package]] +name = "arboard" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "d6041616acea41d67c4a984709ddab1587fd0b10efe5cc563fee954d2f011854" +dependencies = [ + "clipboard-win", + "log", + "objc", + "objc-foundation", + "objc_id", + "once_cell", + "parking_lot", + "thiserror", + "winapi", + "x11rb", +] [[package]] name = "arrayref" @@ -72,6 +114,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + [[package]] name = "async-trait" version = "0.1.68" @@ -80,14 +128,14 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.16", ] [[package]] name = "atomic_refcell" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "857253367827bd9d0fd973f0ef15506a96e79e41b0ad7aa691203a4e3214f6c8" +checksum = "79d6dc922a2792b006573f60b2648076355daeae5ce9cb59507e5908c9625d31" [[package]] name = "autocfg" @@ -131,11 +179,30 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys", + "objc2-encode", +] + [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" [[package]] name = "bytemuck" @@ -154,7 +221,7 @@ checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.16", ] [[package]] @@ -203,6 +270,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "cgl" version = "0.3.2" @@ -220,13 +293,13 @@ dependencies = [ "bytemuck", "cimvr_common", "cimvr_engine", - "egui 0.19.0 (git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi)", - "egui-winit 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "egui", + "egui-winit", "egui_glow", "env_logger", "gilrs", - "glow", - "glutin", + "glow 0.11.2", + "glutin 0.30.8", "glutin-openxr-opengl-helper", "log", "openxr", @@ -291,6 +364,17 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", +] + [[package]] name = "cmake" version = "0.1.50" @@ -638,9 +722,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -656,6 +740,26 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -703,60 +807,52 @@ dependencies = [ ] [[package]] -name = "egui" -version = "0.19.0" +name = "ecolor" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9fcd393c3daaaf5909008a1d948319d538b79c51871e4df0993260260a94e4" +checksum = "1f99fe3cac305af9d6d92971af60d0f7ea4d783201ef1673571567b6699964d9" dependencies = [ - "ahash", - "epaint 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "nohash-hasher", - "tracing", + "bytemuck", ] [[package]] name = "egui" -version = "0.19.0" -source = "git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi#244f1bbe6bf6bf9d100ca516c9ea0a6c5dc5ebfa" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6412a21e0bde7c0918f7fb44bbbb86b5e1f88e63c026a4e747cc7af02f76dfbe" dependencies = [ "ahash", - "epaint 0.19.0 (git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi)", + "epaint", "nohash-hasher", "tracing", ] [[package]] name = "egui-winit" -version = "0.19.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ddc525334c416e11580123e147b970f738507f427c9fb1cd09ea2dd7416a3a" +checksum = "ab43597ba41f0ce39a364ad83185594578bfd8b3409b99dbcbb01df23afc3dbb" dependencies = [ - "egui 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "android-activity", + "arboard", + "egui", "instant", + "smithay-clipboard", "tracing", - "winit", -] - -[[package]] -name = "egui-winit" -version = "0.19.0" -source = "git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi#244f1bbe6bf6bf9d100ca516c9ea0a6c5dc5ebfa" -dependencies = [ - "egui 0.19.0 (git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi)", - "instant", - "tracing", - "winit", + "webbrowser", + "winit 0.28.6", ] [[package]] name = "egui_glow" -version = "0.19.0" -source = "git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi#244f1bbe6bf6bf9d100ca516c9ea0a6c5dc5ebfa" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8257332fb168a965b3dca81d6a344e053153773c889cabdba0b3b76f1629ae81" dependencies = [ "bytemuck", - "egui 0.19.0 (git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi)", - "egui-winit 0.19.0 (git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi)", - "glow", + "egui", + "egui-winit", + "glow 0.12.1", "memoffset 0.6.5", "tracing", "wasm-bindgen", @@ -771,14 +867,9 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "emath" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9542a40106fdba943a055f418d1746a050e1a903a049b030c2b097d4686a33cf" - -[[package]] -name = "emath" -version = "0.19.0" -source = "git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi#244f1bbe6bf6bf9d100ca516c9ea0a6c5dc5ebfa" +checksum = "b8ecd80612937e0267909d5351770fe150004e24dab93954f69ca62eecd3f77e" dependencies = [ "bytemuck", ] @@ -798,28 +889,16 @@ dependencies = [ [[package]] name = "epaint" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba04741be7f6602b1a1b28f1082cce45948a7032961c52814f8946b28493300" -dependencies = [ - "ab_glyph", - "ahash", - "atomic_refcell", - "emath 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "nohash-hasher", - "parking_lot", -] - -[[package]] -name = "epaint" -version = "0.19.0" -source = "git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi#244f1bbe6bf6bf9d100ca516c9ea0a6c5dc5ebfa" +checksum = "12e78b5c58a1f7f621f9d546add2adce20636422c9b251e29f749e8a2f713c95" dependencies = [ "ab_glyph", "ahash", "atomic_refcell", "bytemuck", - "emath 0.19.0 (git+https://github.com/Masterchef365/egui.git?branch=fix-glow-winit-dpi)", + "ecolor", + "emath", "nohash-hasher", "parking_lot", ] @@ -845,6 +924,16 @@ dependencies = [ "libc", ] +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + [[package]] name = "expat-sys" version = "2.1.6" @@ -888,18 +977,18 @@ checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "windows-sys 0.48.0", ] [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide 0.6.2", + "miniz_oxide", ] [[package]] @@ -935,7 +1024,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.16", ] [[package]] @@ -1009,6 +1098,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "getrandom" version = "0.2.9" @@ -1097,6 +1196,18 @@ dependencies = [ "web-sys", ] +[[package]] +name = "glow" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e007a07a24de5ecae94160f141029e9a347282cfe25d1d58d85d845cf3130f1" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "glutin" version = "0.29.1" @@ -1106,10 +1217,10 @@ dependencies = [ "cgl", "cocoa", "core-foundation", - "glutin_egl_sys", + "glutin_egl_sys 0.1.6", "glutin_gles2_sys", "glutin_glx_sys 0.1.8", - "glutin_wgl_sys", + "glutin_wgl_sys 0.1.5", "libloading", "log", "objc", @@ -1120,7 +1231,30 @@ dependencies = [ "wayland-client", "wayland-egl", "winapi", - "winit", + "winit 0.27.5", +] + +[[package]] +name = "glutin" +version = "0.30.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f9b771a65f0a1e3ddb6aa16f867d87dc73c922411c255e6c4ab7f6d45c7327" +dependencies = [ + "bitflags", + "cfg_aliases", + "cgl", + "core-foundation", + "dispatch", + "glutin_egl_sys 0.5.0", + "glutin_glx_sys 0.4.0", + "glutin_wgl_sys 0.4.0", + "libloading", + "objc2", + "once_cell", + "raw-window-handle 0.5.2", + "wayland-sys 0.30.1", + "windows-sys 0.45.0", + "x11-dl", ] [[package]] @@ -1129,7 +1263,7 @@ version = "0.1.0" source = "git+https://github.com/ChatImproVR/rust-opengl-openxr-example.git?rev=c56b2dc#c56b2dc80395b27db56bf2bad09f8abbe2589c4a" dependencies = [ "anyhow", - "glutin", + "glutin 0.29.1", "glutin_glx_sys 0.2.0", "openxr", "windows-sys 0.42.0", @@ -1145,6 +1279,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "glutin_egl_sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b3bcbddc51573b977fc6dca5d93867e4f29682cdbaf5d13e48f4fa4346d4d87" +dependencies = [ + "gl_generator", + "windows-sys 0.45.0", +] + [[package]] name = "glutin_gles2_sys" version = "0.1.5" @@ -1175,6 +1319,16 @@ dependencies = [ "x11-dl", ] +[[package]] +name = "glutin_glx_sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b53cb5fe568964aa066a3ba91eac5ecbac869fb0842cd0dc9e412434f1a1494" +dependencies = [ + "gl_generator", + "x11-dl", +] + [[package]] name = "glutin_wgl_sys" version = "0.1.5" @@ -1184,6 +1338,15 @@ dependencies = [ "gl_generator", ] +[[package]] +name = "glutin_wgl_sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef89398e90033fc6bc65e9bd42fd29bbbfd483bda5b56dc5562f455550618165" +dependencies = [ + "gl_generator", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -1329,7 +1492,7 @@ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix 0.37.13", + "rustix 0.37.19", "windows-sys 0.48.0", ] @@ -1376,6 +1539,22 @@ dependencies = [ "walkdir", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "jni-sys" version = "0.3.0" @@ -1393,9 +1572,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" dependencies = [ "wasm-bindgen", ] @@ -1440,9 +1619,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.142" +version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "libloading" @@ -1472,9 +1651,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.3.3" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b085a4f2cde5781fc4b1717f2e86c62f5cda49de7ba99a7c2eae02b61c9064c" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "lock_api" @@ -1534,7 +1713,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.13", + "rustix 0.37.19", ] [[package]] @@ -1570,15 +1749,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1714,9 +1884,9 @@ dependencies = [ [[package]] name = "notify" -version = "5.1.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ea850aa68a06e48fdb069c0ec44d0d64c8dbffa49bf3b6f7f0a901fdea1ba9" +checksum = "729f63e1ca555a43fe3efa4f3efdf4801c479da85b432242a7b726f353c88486" dependencies = [ "bitflags", "crossbeam-channel", @@ -1727,7 +1897,7 @@ dependencies = [ "libc", "mio", "walkdir", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -1770,6 +1940,52 @@ dependencies = [ "malloc_buf", ] +[[package]] +name = "objc-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] + +[[package]] +name = "objc-sys" +version = "0.2.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + +[[package]] +name = "objc2" +version = "0.3.0-beta.3.patch-leaks.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +dependencies = [ + "block2", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + [[package]] name = "object" version = "0.30.3" @@ -1807,10 +2023,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa8f022053ecd7989d86f867b4fb8c3520347612b9d637e217077a0d6b4a6634" dependencies = [ "cmake", - "jni", + "jni 0.19.0", "libc", ] +[[package]] +name = "orbclient" +version = "0.3.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "221d488cd70617f1bd599ed8ceb659df2147d9393717954d82a0f5e8032a6ab1" +dependencies = [ + "redox_syscall 0.3.5", +] + [[package]] name = "osmesa-sys" version = "0.1.2" @@ -1822,9 +2047,9 @@ dependencies = [ [[package]] name = "owned_ttf_parser" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25e9fb15717794fae58ab55c26e044103aad13186fbb625893f9a3bbcc24228" +checksum = "706de7e2214113d63a8238d1910463cfce781129a6f263d13fdb09ff64355ba4" dependencies = [ "ttf-parser", ] @@ -1847,7 +2072,7 @@ checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "windows-sys 0.45.0", ] @@ -1872,9 +2097,9 @@ checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "png" @@ -1886,7 +2111,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -1931,9 +2156,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" dependencies = [ "unicode-ident", ] @@ -1960,9 +2185,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -2043,6 +2268,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -2050,7 +2284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] @@ -2068,9 +2302,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6cf59af1067a3fb53fbe5c88c053764e930f932be1d71d3ffe032cbe147f59" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ "aho-corasick", "memchr", @@ -2079,9 +2313,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6868896879ba532248f33598de5181522d8b3d9d724dfd230911e1a7d4822f5" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" [[package]] name = "rustc-demangle" @@ -2091,9 +2325,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.36.12" +version = "0.36.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0af200a3324fa5bcd922e84e9b55a298ea9f431a489f01961acdebc6e908f25" +checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" dependencies = [ "bitflags", "errno", @@ -2105,15 +2339,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.13" +version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79bef90eb6d984c72722595b5b1348ab39275a5e5123faca6863bf07d75a4e0" +checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", - "linux-raw-sys 0.3.3", + "linux-raw-sys 0.3.8", "windows-sys 0.48.0", ] @@ -2167,27 +2401,40 @@ dependencies = [ "crossfont", "log", "smithay-client-toolkit", - "tiny-skia", + "tiny-skia 0.7.0", +] + +[[package]] +name = "sctk-adwaita" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia 0.8.4", ] [[package]] name = "serde" -version = "1.0.160" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.16", ] [[package]] @@ -2240,9 +2487,9 @@ checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" [[package]] name = "slice-group-by" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slotmap" @@ -2278,6 +2525,16 @@ dependencies = [ "wayland-protocols", ] +[[package]] +name = "smithay-clipboard" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" +dependencies = [ + "smithay-client-toolkit", + "wayland-client", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -2290,6 +2547,18 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + +[[package]] +name = "strict-num" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df65f20698aeed245efdde3628a6b559ea1239bbb871af1b6e3b58c413b2bd1" + [[package]] name = "strsim" version = "0.10.0" @@ -2333,9 +2602,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" dependencies = [ "proc-macro2", "quote", @@ -2344,9 +2613,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.6" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" +checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "termcolor" @@ -2383,7 +2652,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.16", ] [[package]] @@ -2393,12 +2662,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.5.2", "bytemuck", "cfg-if", "png", "safe_arch", - "tiny-skia-path", + "tiny-skia-path 0.7.0", +] + +[[package]] +name = "tiny-skia" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" +dependencies = [ + "arrayref", + "arrayvec 0.7.2", + "bytemuck", + "cfg-if", + "png", + "tiny-skia-path 0.8.4", ] [[package]] @@ -2411,6 +2694,17 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "tiny-skia-path" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2437,15 +2731,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.19.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "92d964908cec0d030b812013af25a0e57fddfadb1e066ecc6681d86253129d4f" dependencies = [ "indexmap", "toml_datetime", @@ -2465,18 +2759,18 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", ] [[package]] name = "ttf-parser" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609f771ad9c6155384897e1df4d948e692667cc0588548b68eb44d052b27633" +checksum = "44dcf002ae3b32cd25400d6df128c5babec3927cd1eb7ce813cfff20eb6c3746" [[package]] name = "typenum" @@ -2545,9 +2839,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.3.1" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" +checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" [[package]] name = "vec_map" @@ -2579,9 +2873,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2589,24 +2883,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2614,28 +2908,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "wasm-encoder" -version = "0.25.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eff853c4f09eec94d76af527eddad4e9de13b11d6286a1ef7134bc30135a2b7" +checksum = "e77053dc709db790691d3732cfc458adc5acc881dec524965c608effdcd9c581" dependencies = [ "leb128", ] @@ -2703,7 +2997,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.12", + "rustix 0.36.14", "serde", "sha2", "toml", @@ -2780,7 +3074,7 @@ checksum = "d55f4f52b3f26b03e6774f2e6c41c72d4106175c58ddd0b74b4b4a81c1ba702c" dependencies = [ "cc", "cfg-if", - "rustix 0.36.12", + "rustix 0.36.14", "wasmtime-asm-macros", "windows-sys 0.45.0", ] @@ -2818,7 +3112,7 @@ checksum = "e7da0f3ae2e2cefa9d28f3f11bcf7d956433a60ccb34f359cd8c930e2bf1cf5a" dependencies = [ "object", "once_cell", - "rustix 0.36.12", + "rustix 0.36.14", ] [[package]] @@ -2849,7 +3143,7 @@ dependencies = [ "memoffset 0.8.0", "paste", "rand", - "rustix 0.36.12", + "rustix 0.36.14", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", @@ -2882,9 +3176,9 @@ dependencies = [ [[package]] name = "wast" -version = "56.0.0" +version = "58.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b54185c051d7bbe23757d50fe575880a2426a2f06d2e9f6a10fd9a4a42920c0" +checksum = "372eecae2d10a5091c2005b32377d7ecd6feecdf2c05838056d02d8b4f07c429" dependencies = [ "leb128", "memchr", @@ -2894,9 +3188,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.62" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56681922808216ab86d96bb750f70d500b5a7800e41564290fd46bb773581299" +checksum = "6d47446190e112ab1579ab40b3ad7e319d859d74e5134683f04e9f0747bf4173" dependencies = [ "wast", ] @@ -2914,7 +3208,7 @@ dependencies = [ "scoped-tls", "wayland-commons", "wayland-scanner", - "wayland-sys", + "wayland-sys 0.29.5", ] [[package]] @@ -2926,7 +3220,7 @@ dependencies = [ "nix 0.24.3", "once_cell", "smallvec", - "wayland-sys", + "wayland-sys 0.29.5", ] [[package]] @@ -2947,7 +3241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "402de949f81a012926d821a2d659f930694257e76dd92b6e0042ceb27be4107d" dependencies = [ "wayland-client", - "wayland-sys", + "wayland-sys 0.29.5", ] [[package]] @@ -2984,16 +3278,45 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "wayland-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" +dependencies = [ + "dlib", + "lazy_static", + "log", + "pkg-config", +] + [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" dependencies = [ "js-sys", "wasm-bindgen", ] +[[package]] +name = "webbrowser" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b692165700260bbd40fbc5ff23766c03e339fbaca907aeea5cb77bf0a553ca83" +dependencies = [ + "core-foundation", + "dirs", + "jni 0.21.1", + "log", + "ndk-context", + "objc", + "raw-window-handle 0.5.2", + "url", + "web-sys", +] + [[package]] name = "winapi" version = "0.3.9" @@ -3019,6 +3342,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -3238,7 +3570,7 @@ dependencies = [ "percent-encoding", "raw-window-handle 0.4.3", "raw-window-handle 0.5.2", - "sctk-adwaita", + "sctk-adwaita 0.4.3", "smithay-client-toolkit", "wasm-bindgen", "wayland-client", @@ -3248,11 +3580,46 @@ dependencies = [ "x11-dl", ] +[[package]] +name = "winit" +version = "0.28.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "866db3f712fffba75d31bf0cdecf357c8aeafd158c5b7ab51dba2a2b2d47f196" +dependencies = [ + "android-activity", + "bitflags", + "cfg_aliases", + "core-foundation", + "core-graphics", + "dispatch", + "instant", + "libc", + "log", + "mio", + "ndk", + "objc2", + "once_cell", + "orbclient", + "percent-encoding", + "raw-window-handle 0.5.2", + "redox_syscall 0.3.5", + "sctk-adwaita 0.5.4", + "smithay-client-toolkit", + "wasm-bindgen", + "wayland-client", + "wayland-commons", + "wayland-protocols", + "wayland-scanner", + "web-sys", + "windows-sys 0.45.0", + "x11-dl", +] + [[package]] name = "winnow" -version = "0.4.1" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" dependencies = [ "memchr", ] @@ -3292,6 +3659,28 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" +dependencies = [ + "gethostname", + "nix 0.24.3", + "winapi", + "winapi-wsapoll", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" +dependencies = [ + "nix 0.24.3", +] + [[package]] name = "xcursor" version = "0.3.4" @@ -3303,9 +3692,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.4" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +checksum = "1690519550bfa95525229b9ca2350c63043a4857b3b0013811b2ccf4a2420b01" [[package]] name = "zstd" diff --git a/client/Cargo.toml b/client/Cargo.toml index c51215d..aa1d740 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -14,26 +14,25 @@ cimvr_engine = { path = "../engine" } cimvr_common = { path = "../common" } anyhow = "1" bytemuck = "1.12.3" -glutin = "0.29.0" +glutin = "0.30.8" glow = "0.11.2" env_logger = "0.10.0" log = "0.4.17" structopt = { version = "0.3", default-features = false } #egui_glow = { version = "0.19.0", features = ["winit"] } #egui = { version = "0.19.0", default-features = false, features = [ -egui = { version = "0.19.0", default-features = false, features = [ +egui = { version = "0.21.0", default-features = false, features = [ "bytemuck", "default_fonts", # Embed the default egui fonts. -], git = "https://github.com/Masterchef365/egui.git", branch = "fix-glow-winit-dpi" } -egui_glow = { version = "0.19.0", features = ["winit"], git = "https://github.com/Masterchef365/egui.git", branch = "fix-glow-winit-dpi" } -egui-winit = { version = "0.19.0", default-features = false } +] } +egui_glow = { version = "0.21.0", features = ["winit"] } +egui-winit = { version = "0.21.1" } raw-window-handle = "0.5.0" gilrs = { version = "0.10.2", default-features = false, features = ["xinput"] } +glutin-openxr-opengl-helper = { git = "https://github.com/ChatImproVR/rust-opengl-openxr-example.git", rev = "c56b2dc" } [target.'cfg(target_os = "linux")'.dependencies] openxr = { version = "0.17.1", optional = true, features = ["loaded"] } -glutin-openxr-opengl-helper = { git = "https://github.com/ChatImproVR/rust-opengl-openxr-example.git", rev = "c56b2dc" } [target.'cfg(target_os = "windows")'.dependencies] openxr = { version = "0.17.1", optional = true, features = ["static"] } -glutin-openxr-opengl-helper = { git = "https://github.com/ChatImproVR/rust-opengl-openxr-example.git", rev = "c56b2dc" } diff --git a/example_plugins/xyz_reference/src/lib.rs b/example_plugins/xyz_reference/src/lib.rs index d29b39c..c591e44 100644 --- a/example_plugins/xyz_reference/src/lib.rs +++ b/example_plugins/xyz_reference/src/lib.rs @@ -9,11 +9,10 @@ struct ClientState; make_app_state!(ClientState, ServerState); -const POSITIVE_LENGTH : f32 = 5.0; +const POSITIVE_LENGTH: f32 = 5.0; const NEGATIVE_LENGTH: f32 = 2.0; fn x_positive_line() -> Mesh { - // List of vertex positions and colors let vertices = vec![ Vertex::new([0., 0., 0.], [1.0, 0.0, 0.0]), @@ -21,27 +20,24 @@ fn x_positive_line() -> Mesh { ]; // Each 2 indices (indexing into vertices) define a line - let indices = vec![ - 0,1 - ]; + let indices = vec![0, 1]; Mesh { vertices, indices } } fn x_negative_dotted_line() -> Mesh { - let iteration = (NEGATIVE_LENGTH * 20.) as u32; - let vertices = (0..iteration).map(|i| Vertex::new([-0.05 * i as f32, 0., 0.], [1.0, 0.0, 0.0])).collect::>(); + let vertices = (0..iteration) + .map(|i| Vertex::new([-0.05 * i as f32, 0., 0.], [1.0, 0.0, 0.0])) + .collect::>(); let indices = (0..iteration).collect(); - Mesh { vertices, indices} - + Mesh { vertices, indices } } fn y_positive_line() -> Mesh { - // List of vertex positions and colors let vertices = vec![ Vertex::new([0., 0., 0.], [0.0, 1.0, 0.0]), @@ -49,26 +45,24 @@ fn y_positive_line() -> Mesh { ]; // Each 2 indices (indexing into vertices) define a line - let indices = vec![ - 0,1 - ]; + let indices = vec![0, 1]; Mesh { vertices, indices } } fn y_negative_dotted_line() -> Mesh { - let iteration = (NEGATIVE_LENGTH * 20.) as u32; - let vertices = (0..iteration).map(|i| Vertex::new([0., -0.05 * i as f32, 0.], [0.0, 1.0, 0.0])).collect::>(); + let vertices = (0..iteration) + .map(|i| Vertex::new([0., -0.05 * i as f32, 0.], [0.0, 1.0, 0.0])) + .collect::>(); let indices = (0..iteration).collect(); - Mesh { vertices, indices} + Mesh { vertices, indices } } fn z_positive_line() -> Mesh { - // List of vertex positions and colors let vertices = vec![ Vertex::new([0., 0., 0.], [0.0, 0.0, 1.0]), @@ -76,22 +70,21 @@ fn z_positive_line() -> Mesh { ]; // Each 2 indices (indexing into vertices) define a line - let indices = vec![ - 0,1 - ]; + let indices = vec![0, 1]; Mesh { vertices, indices } } fn z_negative_dotted_line() -> Mesh { - let iteration = (NEGATIVE_LENGTH * 20.) as u32; - let vertices = (0..iteration).map(|i| Vertex::new([0., 0., -0.05 * i as f32], [0.0, 0.0, 1.0])).collect::>(); + let vertices = (0..iteration) + .map(|i| Vertex::new([0., 0., -0.05 * i as f32], [0.0, 0.0, 1.0])) + .collect::>(); let indices = (0..iteration).collect(); - Mesh { vertices, indices} + Mesh { vertices, indices } } /// This handle uniquely identifies the mesh data between all clients, and the server. @@ -105,7 +98,6 @@ const Y_NEGATIVE: MeshHandle = MeshHandle::new(pkg_namespace!("Y_negative")); const Z_POSITIVE: MeshHandle = MeshHandle::new(pkg_namespace!("Z_positive")); const Z_NEGATIVE: MeshHandle = MeshHandle::new(pkg_namespace!("Z_negative")); - impl UserState for ClientState { fn new(io: &mut EngineIo, _sched: &mut EngineSchedule) -> Self { // Make the cube mesh available to the rendering engine @@ -185,4 +177,4 @@ impl UserState for ServerState { Self } -} \ No newline at end of file +} From 191f4a7027120c7940dd8795587a333e115564e4 Mon Sep 17 00:00:00 2001 From: Masterchef365 Date: Sat, 20 May 2023 16:34:59 -0700 Subject: [PATCH 2/5] Steal some code to get closer --- client/Cargo.lock | 29 +++--- client/Cargo.toml | 3 +- client/src/desktop.rs | 20 +++- client/src/desktop_input.rs | 41 +++++---- client/src/glutin_window_ctx.rs | 157 ++++++++++++++++++++++++++++++++ client/src/main.rs | 1 + 6 files changed, 212 insertions(+), 39 deletions(-) create mode 100644 client/src/glutin_window_ctx.rs diff --git a/client/Cargo.lock b/client/Cargo.lock index 4d98455..2937114 100644 --- a/client/Cargo.lock +++ b/client/Cargo.lock @@ -298,9 +298,10 @@ dependencies = [ "egui_glow", "env_logger", "gilrs", - "glow 0.11.2", + "glow", "glutin 0.30.8", "glutin-openxr-opengl-helper", + "glutin-winit", "log", "openxr", "raw-window-handle 0.5.2", @@ -852,7 +853,7 @@ dependencies = [ "bytemuck", "egui", "egui-winit", - "glow 0.12.1", + "glow", "memoffset 0.6.5", "tracing", "wasm-bindgen", @@ -1184,18 +1185,6 @@ dependencies = [ "serde", ] -[[package]] -name = "glow" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "glow" version = "0.12.1" @@ -1269,6 +1258,18 @@ dependencies = [ "windows-sys 0.42.0", ] +[[package]] +name = "glutin-winit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629a873fc04062830bfe8f97c03773bcd7b371e23bcc465d0a61448cd1588fa4" +dependencies = [ + "cfg_aliases", + "glutin 0.30.8", + "raw-window-handle 0.5.2", + "winit 0.28.6", +] + [[package]] name = "glutin_egl_sys" version = "0.1.6" diff --git a/client/Cargo.toml b/client/Cargo.toml index aa1d740..aa37e88 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -15,7 +15,7 @@ cimvr_common = { path = "../common" } anyhow = "1" bytemuck = "1.12.3" glutin = "0.30.8" -glow = "0.11.2" +glow = "0.12" env_logger = "0.10.0" log = "0.4.17" structopt = { version = "0.3", default-features = false } @@ -30,6 +30,7 @@ egui-winit = { version = "0.21.1" } raw-window-handle = "0.5.0" gilrs = { version = "0.10.2", default-features = false, features = ["xinput"] } glutin-openxr-opengl-helper = { git = "https://github.com/ChatImproVR/rust-opengl-openxr-example.git", rev = "c56b2dc" } +glutin-winit = "0.3.0" [target.'cfg(target_os = "linux")'.dependencies] openxr = { version = "0.17.1", optional = true, features = ["loaded"] } diff --git a/client/src/desktop.rs b/client/src/desktop.rs index f260f5c..500dda3 100644 --- a/client/src/desktop.rs +++ b/client/src/desktop.rs @@ -3,14 +3,15 @@ use crate::{Client, Opt}; use anyhow::Result; use cimvr_common::glam::Mat4; use cimvr_engine::interface::system::Stage; -use glutin::event::{Event, WindowEvent}; -use glutin::event_loop::ControlFlow; +use egui_winit::winit; +use winit::event::{Event, WindowEvent}; +use winit::event_loop::ControlFlow; use std::sync::Arc; pub fn mainloop(args: Opt) -> Result<()> { // Set up window - let event_loop = glutin::event_loop::EventLoop::new(); - let window_builder = glutin::window::WindowBuilder::new().with_title("ChatImproVR"); + let event_loop = winit::event_loop::EventLoop::new(); + let window_builder = winit::window::WindowBuilder::new().with_title("ChatImproVR"); // Set up OpenGL let glutin_ctx = unsafe { @@ -21,6 +22,17 @@ pub fn mainloop(args: Opt) -> Result<()> { .unwrap() }; + let glutin_window_context = unsafe { GlutinWindowContext::new(event_loop) }; + let gl = unsafe { + glow::Context::from_loader_function(|s| { + let s = std::ffi::CString::new(s) + .expect("failed to construct C string from string for gl proc address"); + + glutin_window_context.get_proc_address(&s) + }) + }; + + let gl = unsafe { gl::Context::from_loader_function(|s| glutin_ctx.get_proc_address(s) as *const _) }; diff --git a/client/src/desktop_input.rs b/client/src/desktop_input.rs index c4ddd4d..1805954 100644 --- a/client/src/desktop_input.rs +++ b/client/src/desktop_input.rs @@ -1,5 +1,6 @@ use cimvr_common::desktop::*; use cimvr_engine::Engine; +use egui_winit::winit; /// Input handler for Desktop platform pub struct DesktopInputHandler { @@ -21,11 +22,11 @@ impl DesktopInputHandler { } /// Handle a Winit event - pub fn handle_winit_event(&mut self, event: &glutin::event::WindowEvent) { + pub fn handle_winit_event(&mut self, event: &winit::event::WindowEvent) { match event { #[allow(deprecated)] // lol - glutin::event::WindowEvent::KeyboardInput { input, .. } => { - if let glutin::event::KeyboardInput { + winit::event::WindowEvent::KeyboardInput { input, .. } => { + if let winit::event::KeyboardInput { state, virtual_keycode: Some(key), .. @@ -38,24 +39,24 @@ impl DesktopInputHandler { self.events.push(InputEvent::Keyboard(event)); } } - glutin::event::WindowEvent::ModifiersChanged(modifiers) => { + winit::event::WindowEvent::ModifiersChanged(modifiers) => { self.events .push(InputEvent::Keyboard(KeyboardEvent::Modifiers( map_modifiers(*modifiers), ))) } - glutin::event::WindowEvent::CursorMoved { position, .. } => { + winit::event::WindowEvent::CursorMoved { position, .. } => { let event = MouseEvent::Moved(position.x as f32, position.y as f32); self.events.push(InputEvent::Mouse(event)); } - glutin::event::WindowEvent::CursorEntered { .. } => { + winit::event::WindowEvent::CursorEntered { .. } => { self.events.push(InputEvent::Mouse(MouseEvent::Entered)) } - glutin::event::WindowEvent::CursorLeft { .. } => { + winit::event::WindowEvent::CursorLeft { .. } => { self.events.push(InputEvent::Mouse(MouseEvent::Exited)) } #[allow(deprecated)] // lol, uwu - glutin::event::WindowEvent::MouseInput { + winit::event::WindowEvent::MouseInput { state, button, modifiers, @@ -68,17 +69,17 @@ impl DesktopInputHandler { ); self.events.push(InputEvent::Mouse(event)); } - glutin::event::WindowEvent::MouseWheel { delta, .. } => match *delta { - glutin::event::MouseScrollDelta::LineDelta(x, y) => self + winit::event::WindowEvent::MouseWheel { delta, .. } => match *delta { + winit::event::MouseScrollDelta::LineDelta(x, y) => self .events .push(InputEvent::Mouse(MouseEvent::Scrolled(x, y))), - glutin::event::MouseScrollDelta::PixelDelta(physical_pos) => { + winit::event::MouseScrollDelta::PixelDelta(physical_pos) => { let (x, y) = physical_pos.into(); self.events .push(InputEvent::Mouse(MouseEvent::Scrolled(x, y))); } }, - glutin::event::WindowEvent::Resized(sz) => { + winit::event::WindowEvent::Resized(sz) => { self.events.push(InputEvent::Window(WindowEvent::Resized { width: sz.width, height: sz.height, @@ -89,8 +90,8 @@ impl DesktopInputHandler { } } -fn map_mouse_button(button: glutin::event::MouseButton) -> MouseButton { - use glutin::event::MouseButton as Gm; +fn map_mouse_button(button: winit::event::MouseButton) -> MouseButton { + use winit::event::MouseButton as Gm; match button { Gm::Left => MouseButton::Left, Gm::Middle => MouseButton::Middle, @@ -99,7 +100,7 @@ fn map_mouse_button(button: glutin::event::MouseButton) -> MouseButton { } } -fn map_modifiers(state: glutin::event::ModifiersState) -> ModifiersState { +fn map_modifiers(state: winit::event::ModifiersState) -> ModifiersState { ModifiersState { shift: state.shift(), ctrl: state.ctrl(), @@ -108,15 +109,15 @@ fn map_modifiers(state: glutin::event::ModifiersState) -> ModifiersState { } } -fn map_elem_state(state: glutin::event::ElementState) -> ElementState { +fn map_elem_state(state: winit::event::ElementState) -> ElementState { match state { - glutin::event::ElementState::Pressed => ElementState::Pressed, - glutin::event::ElementState::Released => ElementState::Released, + winit::event::ElementState::Pressed => ElementState::Pressed, + winit::event::ElementState::Released => ElementState::Released, } } -fn map_keycode(key: glutin::event::VirtualKeyCode) -> KeyCode { - use glutin::event::VirtualKeyCode as Gk; +fn map_keycode(key: winit::event::VirtualKeyCode) -> KeyCode { + use winit::event::VirtualKeyCode as Gk; match key { Gk::Key1 => KeyCode::Key1, Gk::Key2 => KeyCode::Key2, diff --git a/client/src/glutin_window_ctx.rs b/client/src/glutin_window_ctx.rs new file mode 100644 index 0000000..3f66b12 --- /dev/null +++ b/client/src/glutin_window_ctx.rs @@ -0,0 +1,157 @@ +/// Stolen from egui-glow/examples/pure_glow.rs + +use egui_winit::winit; + +/// The majority of `GlutinWindowContext` is taken from `eframe` +pub struct GlutinWindowContext { + window: winit::window::Window, + gl_context: glutin::context::PossiblyCurrentContext, + gl_display: glutin::display::Display, + gl_surface: glutin::surface::Surface, +} + +impl GlutinWindowContext { + // refactor this function to use `glutin-winit` crate eventually. + // preferably add android support at the same time. + #[allow(unsafe_code)] + pub unsafe fn new(event_loop: &winit::event_loop::EventLoopWindowTarget<()>) -> Self { + use egui::NumExt; + use glutin::context::NotCurrentGlContextSurfaceAccessor; + use glutin::display::GetGlDisplay; + use glutin::display::GlDisplay; + use glutin::prelude::GlSurface; + use raw_window_handle::HasRawWindowHandle; + let winit_window_builder = winit::window::WindowBuilder::new() + .with_resizable(true) + .with_inner_size(winit::dpi::LogicalSize { + width: 800.0, + height: 600.0, + }) + .with_title("egui_glow example") // Keep hidden until we've painted something. See https://github.com/emilk/egui/pull/2279 + .with_visible(false); + + let config_template_builder = glutin::config::ConfigTemplateBuilder::new() + .prefer_hardware_accelerated(None) + .with_depth_size(0) + .with_stencil_size(0) + .with_transparency(false); + + log::debug!("trying to get gl_config"); + let (mut window, gl_config) = + glutin_winit::DisplayBuilder::new() // let glutin-winit helper crate handle the complex parts of opengl context creation + .with_preference(glutin_winit::ApiPrefence::FallbackEgl) // https://github.com/emilk/egui/issues/2520#issuecomment-1367841150 + .with_window_builder(Some(winit_window_builder.clone())) + .build( + event_loop, + config_template_builder, + |mut config_iterator| { + config_iterator.next().expect( + "failed to find a matching configuration for creating glutin config", + ) + }, + ) + .expect("failed to create gl_config"); + let gl_display = gl_config.display(); + log::debug!("found gl_config: {:?}", &gl_config); + + let raw_window_handle = window.as_ref().map(|w| w.raw_window_handle()); + log::debug!("raw window handle: {:?}", raw_window_handle); + let context_attributes = + glutin::context::ContextAttributesBuilder::new().build(raw_window_handle); + // by default, glutin will try to create a core opengl context. but, if it is not available, try to create a gl-es context using this fallback attributes + let fallback_context_attributes = glutin::context::ContextAttributesBuilder::new() + .with_context_api(glutin::context::ContextApi::Gles(None)) + .build(raw_window_handle); + let not_current_gl_context = unsafe { + gl_display + .create_context(&gl_config, &context_attributes) + .unwrap_or_else(|_| { + log::debug!("failed to create gl_context with attributes: {:?}. retrying with fallback context attributes: {:?}", + &context_attributes, + &fallback_context_attributes); + gl_config + .display() + .create_context(&gl_config, &fallback_context_attributes) + .expect("failed to create context even with fallback attributes") + }) + }; + + // this is where the window is created, if it has not been created while searching for suitable gl_config + let window = window.take().unwrap_or_else(|| { + log::debug!("window doesn't exist yet. creating one now with finalize_window"); + glutin_winit::finalize_window(event_loop, winit_window_builder.clone(), &gl_config) + .expect("failed to finalize glutin window") + }); + let (width, height): (u32, u32) = window.inner_size().into(); + let width = std::num::NonZeroU32::new(width.at_least(1)).unwrap(); + let height = std::num::NonZeroU32::new(height.at_least(1)).unwrap(); + let surface_attributes = + glutin::surface::SurfaceAttributesBuilder::::new() + .build(window.raw_window_handle(), width, height); + log::debug!( + "creating surface with attributes: {:?}", + &surface_attributes + ); + let gl_surface = unsafe { + gl_display + .create_window_surface(&gl_config, &surface_attributes) + .unwrap() + }; + log::debug!("surface created successfully: {gl_surface:?}.making context current"); + let gl_context = not_current_gl_context.make_current(&gl_surface).unwrap(); + + gl_surface + .set_swap_interval( + &gl_context, + glutin::surface::SwapInterval::Wait(std::num::NonZeroU32::new(1).unwrap()), + ) + .unwrap(); + + GlutinWindowContext { + window, + gl_context, + gl_display, + gl_surface, + } + } + + fn window(&self) -> &winit::window::Window { + &self.window + } + + fn resize(&self, physical_size: winit::dpi::PhysicalSize) { + use glutin::surface::GlSurface; + self.gl_surface.resize( + &self.gl_context, + physical_size.width.try_into().unwrap(), + physical_size.height.try_into().unwrap(), + ); + } + + fn swap_buffers(&self) -> glutin::error::Result<()> { + use glutin::surface::GlSurface; + self.gl_surface.swap_buffers(&self.gl_context) + } + + fn get_proc_address(&self, addr: &std::ffi::CStr) -> *const std::ffi::c_void { + use glutin::display::GlDisplay; + self.gl_display.get_proc_address(addr) + } +} + +fn create_display( + event_loop: &winit::event_loop::EventLoopWindowTarget<()>, +) -> (GlutinWindowContext, glow::Context) { + let glutin_window_context = unsafe { GlutinWindowContext::new(event_loop) }; + let gl = unsafe { + glow::Context::from_loader_function(|s| { + let s = std::ffi::CString::new(s) + .expect("failed to construct C string from string for gl proc address"); + + glutin_window_context.get_proc_address(&s) + }) + }; + + (glutin_window_context, gl) +} + diff --git a/client/src/main.rs b/client/src/main.rs index b700245..0a69847 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -29,6 +29,7 @@ mod desktop_input; mod gamepad; mod render; mod ui; +mod glutin_window_ctx; use structopt::StructOpt; From 111304691384d63849e5811a21f871a02f287136 Mon Sep 17 00:00:00 2001 From: Masterchef365 Date: Sat, 20 May 2023 16:43:02 -0700 Subject: [PATCH 3/5] Uhm not compile errors but... --- client/src/desktop.rs | 29 ++++------------------------- client/src/glutin_window_ctx.rs | 10 +++++----- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/client/src/desktop.rs b/client/src/desktop.rs index 500dda3..9fdfcc0 100644 --- a/client/src/desktop.rs +++ b/client/src/desktop.rs @@ -1,4 +1,5 @@ use crate::desktop_input::DesktopInputHandler; +use crate::glutin_window_ctx::create_display; use crate::{Client, Opt}; use anyhow::Result; use cimvr_common::glam::Mat4; @@ -11,35 +12,13 @@ use std::sync::Arc; pub fn mainloop(args: Opt) -> Result<()> { // Set up window let event_loop = winit::event_loop::EventLoop::new(); - let window_builder = winit::window::WindowBuilder::new().with_title("ChatImproVR"); // Set up OpenGL - let glutin_ctx = unsafe { - glutin::ContextBuilder::new() - .with_vsync(true) - .build_windowed(window_builder, &event_loop)? - .make_current() - .unwrap() - }; - - let glutin_window_context = unsafe { GlutinWindowContext::new(event_loop) }; - let gl = unsafe { - glow::Context::from_loader_function(|s| { - let s = std::ffi::CString::new(s) - .expect("failed to construct C string from string for gl proc address"); - - glutin_window_context.get_proc_address(&s) - }) - }; - - - let gl = unsafe { - gl::Context::from_loader_function(|s| glutin_ctx.get_proc_address(s) as *const _) - }; + let (glutin_ctx, gl) = create_display(&event_loop); let gl = Arc::new(gl); // Set up egui - let mut egui_glow = egui_glow::EguiGlow::new(&event_loop, gl.clone()); + let mut egui_glow = egui_glow::EguiGlow::new(&event_loop, gl.clone(), None); // Set up desktop input let mut input = DesktopInputHandler::new(); @@ -98,7 +77,7 @@ pub fn mainloop(args: Opt) -> Result<()> { glutin_ctx.swap_buffers().unwrap(); } Event::WindowEvent { ref event, .. } => { - if !egui_glow.on_event(&event) { + if !egui_glow.on_event(&event).consumed { input.handle_winit_event(event); } diff --git a/client/src/glutin_window_ctx.rs b/client/src/glutin_window_ctx.rs index 3f66b12..6374b5e 100644 --- a/client/src/glutin_window_ctx.rs +++ b/client/src/glutin_window_ctx.rs @@ -115,11 +115,11 @@ impl GlutinWindowContext { } } - fn window(&self) -> &winit::window::Window { + pub fn window(&self) -> &winit::window::Window { &self.window } - fn resize(&self, physical_size: winit::dpi::PhysicalSize) { + pub fn resize(&self, physical_size: winit::dpi::PhysicalSize) { use glutin::surface::GlSurface; self.gl_surface.resize( &self.gl_context, @@ -128,18 +128,18 @@ impl GlutinWindowContext { ); } - fn swap_buffers(&self) -> glutin::error::Result<()> { + pub fn swap_buffers(&self) -> glutin::error::Result<()> { use glutin::surface::GlSurface; self.gl_surface.swap_buffers(&self.gl_context) } - fn get_proc_address(&self, addr: &std::ffi::CStr) -> *const std::ffi::c_void { + pub fn get_proc_address(&self, addr: &std::ffi::CStr) -> *const std::ffi::c_void { use glutin::display::GlDisplay; self.gl_display.get_proc_address(addr) } } -fn create_display( +pub fn create_display( event_loop: &winit::event_loop::EventLoopWindowTarget<()>, ) -> (GlutinWindowContext, glow::Context) { let glutin_window_context = unsafe { GlutinWindowContext::new(event_loop) }; From 2abd3e64dd6d3af760eec8d6dd9e8296b1fe3bc4 Mon Sep 17 00:00:00 2001 From: Masterchef365 Date: Sat, 20 May 2023 16:47:52 -0700 Subject: [PATCH 4/5] Make sure to show the window --- client/src/desktop.rs | 3 +++ client/src/glutin_window_ctx.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/desktop.rs b/client/src/desktop.rs index 9fdfcc0..d3b8324 100644 --- a/client/src/desktop.rs +++ b/client/src/desktop.rs @@ -65,6 +65,9 @@ pub fn mainloop(args: Opt) -> Result<()> { // Render UI egui_glow.paint(glutin_ctx.window()); + // Show the window on first draw + glutin_ctx.window().set_visible(true); + // Post update stage client .engine() diff --git a/client/src/glutin_window_ctx.rs b/client/src/glutin_window_ctx.rs index 6374b5e..4cc8b57 100644 --- a/client/src/glutin_window_ctx.rs +++ b/client/src/glutin_window_ctx.rs @@ -27,7 +27,7 @@ impl GlutinWindowContext { width: 800.0, height: 600.0, }) - .with_title("egui_glow example") // Keep hidden until we've painted something. See https://github.com/emilk/egui/pull/2279 + .with_title("ChatImproVR") // Keep hidden until we've painted something. See https://github.com/emilk/egui/pull/2279 .with_visible(false); let config_template_builder = glutin::config::ConfigTemplateBuilder::new() From da9651161196ce8cb3dd1ffdd6ca91a3b573dc4d Mon Sep 17 00:00:00 2001 From: Masterchef365 Date: Sat, 20 May 2023 17:43:27 -0700 Subject: [PATCH 5/5] Don't bother hiding the window because ms windows sucks --- client/src/glutin_window_ctx.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/glutin_window_ctx.rs b/client/src/glutin_window_ctx.rs index 4cc8b57..bde45c4 100644 --- a/client/src/glutin_window_ctx.rs +++ b/client/src/glutin_window_ctx.rs @@ -27,8 +27,8 @@ impl GlutinWindowContext { width: 800.0, height: 600.0, }) - .with_title("ChatImproVR") // Keep hidden until we've painted something. See https://github.com/emilk/egui/pull/2279 - .with_visible(false); + .with_title("ChatImproVR"); // Keep hidden until we've painted something. See https://github.com/emilk/egui/pull/2279 + //.with_visible(false); let config_template_builder = glutin::config::ConfigTemplateBuilder::new() .prefer_hardware_accelerated(None)