diff --git a/Cargo.lock b/Cargo.lock index 4980310..dd635fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -51,7 +51,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", "once_cell", "version_check", "zerocopy", @@ -72,6 +71,30 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "android-activity" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +dependencies = [ + "android-properties", + "bitflags 1.3.2", + "cc", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum 0.6.1", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -172,12 +195,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -226,9 +243,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" dependencies = [ "addr2line", "cc", @@ -319,6 +336,25 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[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.16.0" @@ -342,9 +378,9 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "369cfaf2a5bed5d8f8202073b2e093c9f508251de1551a0deb4253e4c7d80909" +checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", @@ -419,6 +455,11 @@ name = "cc" version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] [[package]] name = "cexpr" @@ -521,7 +562,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim", ] [[package]] @@ -542,61 +583,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - -[[package]] -name = "cocoa" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics 0.22.3", - "foreign-types 0.3.2", - "libc", - "objc", -] - -[[package]] -name = "cocoa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics 0.23.2", - "foreign-types 0.5.0", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation", - "core-graphics-types", - "libc", - "objc", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -626,10 +612,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] -name = "copyless" -version = "0.1.5" +name = "com-rs" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" +checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" [[package]] name = "core-foundation" @@ -656,20 +642,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", - "libc", -] - -[[package]] -name = "core-graphics" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", - "foreign-types 0.5.0", + "foreign-types", "libc", ] @@ -684,18 +657,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-text" -version = "20.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d2790b5c08465d49f8dc05c8bcae9fea467855947db39b0f8145c091aaced5" -dependencies = [ - "core-foundation", - "core-graphics 0.23.2", - "foreign-types 0.5.0", - "libc", -] - [[package]] name = "crc32fast" version = "1.4.2" @@ -775,84 +736,31 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" -[[package]] -name = "crossfont" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb5a3822b594afc99b503cc1859b94686d3c3efdd60507a28587dab80ee1071" -dependencies = [ - "cocoa 0.25.0", - "core-foundation", - "core-foundation-sys", - "core-graphics 0.23.2", - "core-text", - "dwrote", - "foreign-types 0.5.0", - "freetype-rs", - "libc", - "log", - "objc", - "once_cell", - "pkg-config", - "servo-fontconfig", - "winapi", -] - [[package]] name = "crunchy" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "d3d12" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" +checksum = "d8f0de2f5a8e7bd4a9eec0e3c781992a4ce1724f68aec7d7a3715344de8b39da" dependencies = [ "bitflags 1.3.2", "libloading 0.7.4", "winapi", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" dependencies = [ - "darling_core 0.20.9", - "darling_macro 0.20.9", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -865,28 +773,17 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.66", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ - "darling_core 0.20.9", + "darling_core", "quote", "syn 2.0.66", ] @@ -923,17 +820,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] -name = "dwrote" -version = "0.11.0" +name = "ecolor" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" +checksum = "1f99fe3cac305af9d6d92971af60d0f7ea4d783201ef1673571567b6699964d9" dependencies = [ - "lazy_static", - "libc", - "serde", - "serde_derive", - "winapi", - "wio", + "bytemuck", ] [[package]] @@ -949,33 +841,33 @@ dependencies = [ [[package]] name = "egui" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9fcd393c3daaaf5909008a1d948319d538b79c51871e4df0993260260a94e4" +checksum = "6412a21e0bde7c0918f7fb44bbbb86b5e1f88e63c026a4e747cc7af02f76dfbe" dependencies = [ "ahash 0.8.11", - "epaint 0.19.0", + "epaint 0.21.0", "nohash-hasher", ] [[package]] name = "egui_wgpu_backend" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3c6ad20da012d92ae595f7c160f5f403bb4ac906403b19c2ad69c5537c256" +checksum = "72e3987dfe2ed2852a5b78aa5b1c5a0e39ffc14445e6611b00b61d653fd95535" dependencies = [ "bytemuck", - "egui 0.19.0", + "egui 0.21.0", "wgpu", ] [[package]] name = "egui_winit_platform" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34fb1c870207c14b99fb7ed9a8760fd7be9a0d96b3516ead3a5e3abe7bb88400" +checksum = "ea93cdf93d8a4b2515dba53e3c83ede5dcededb41cb3aea02e7ef267d60a7653" dependencies = [ - "egui 0.19.0", + "egui 0.21.0", "winit", ] @@ -993,9 +885,9 @@ checksum = "a977a80456be58a2c2d48e69c1d0baadef46cecef5a0c98df141c468da006f12" [[package]] name = "emath" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9542a40106fdba943a055f418d1746a050e1a903a049b030c2b097d4686a33cf" +checksum = "b8ecd80612937e0267909d5351770fe150004e24dab93954f69ca62eecd3f77e" dependencies = [ "bytemuck", ] @@ -1033,15 +925,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" +checksum = "12e78b5c58a1f7f621f9d546add2adce20636422c9b251e29f749e8a2f713c95" dependencies = [ "ab_glyph", "ahash 0.8.11", "atomic_refcell", "bytemuck", - "emath 0.19.0", + "ecolor", + "emath 0.21.0", "nohash-hasher", "parking_lot", ] @@ -1081,16 +974,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "expat-sys" -version = "2.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" -dependencies = [ - "cmake", - "pkg-config", -] - [[package]] name = "exr" version = "1.72.0" @@ -1193,28 +1076,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1", -] - -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared 0.3.1", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", + "foreign-types-shared", ] [[package]] @@ -1223,12 +1085,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1238,28 +1094,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "freetype-rs" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" -dependencies = [ - "bitflags 1.3.2", - "freetype-sys", - "libc", -] - -[[package]] -name = "freetype-sys" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" -dependencies = [ - "cmake", - "libc", - "pkg-config", -] - [[package]] name = "futures" version = "0.3.30" @@ -1381,9 +1215,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -1393,9 +1227,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "glow" -version = "0.11.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" +checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" dependencies = [ "js-sys", "slotmap", @@ -1460,6 +1294,19 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "gpu-allocator" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8" +dependencies = [ + "backtrace", + "log", + "thiserror", + "winapi", + "windows", +] + [[package]] name = "gpu-descriptor" version = "0.2.4" @@ -1525,6 +1372,21 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hassle-rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90601c6189668c7345fc53842cb3f3a3d872203d523be1b3cb44a36a3e62fb85" +dependencies = [ + "bitflags 1.3.2", + "com-rs", + "libc", + "libloading 0.7.4", + "thiserror", + "widestring", + "winapi", +] + [[package]] name = "heck" version = "0.5.0" @@ -1705,12 +1567,6 @@ dependencies = [ "serde", ] -[[package]] -name = "inplace_it" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e567468c50f3d4bc7397702e09b380139f9b9288b4e909b070571007f8b5bf78" - [[package]] name = "instant" version = "0.1.13" @@ -1787,6 +1643,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + [[package]] name = "jpeg-decoder" version = "0.3.1" @@ -1895,6 +1760,17 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.5.0", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -1981,7 +1857,7 @@ dependencies = [ "bitflags 1.3.2", "block", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types", "log", "objc", ] @@ -2022,9 +1898,9 @@ dependencies = [ [[package]] name = "naga" -version = "0.9.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f50357e1167a3ab92d6b3c7f4bf5f7fd13fde3f4b28bf0d5ea07b5100fdb6c0" +checksum = "6c3d4269bcb7d50121097702fde1afb75f4ea8083aeb7a55688dcf289a853271" dependencies = [ "bit-set", "bitflags 1.3.2", @@ -2103,8 +1979,8 @@ dependencies = [ "bitflags 1.3.2", "jni-sys", "ndk-sys", - "num_enum", - "raw-window-handle 0.5.2", + "num_enum 0.5.11", + "raw-window-handle", "thiserror", ] @@ -2114,35 +1990,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-glue" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" -dependencies = [ - "libc", - "log", - "ndk", - "ndk-context", - "ndk-macro", - "ndk-sys", - "once_cell", - "parking_lot", -] - -[[package]] -name = "ndk-macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" -dependencies = [ - "darling 0.13.4", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ndk-sys" version = "0.4.1+23.1.7779620" @@ -2264,7 +2111,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", ] [[package]] @@ -2279,6 +2135,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "objc" version = "0.2.7" @@ -2289,6 +2157,32 @@ dependencies = [ "objc_exception", ] +[[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_exception" version = "0.1.2" @@ -2300,9 +2194,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] @@ -2327,7 +2221,7 @@ checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ "bitflags 2.5.0", "cfg-if", - "foreign-types 0.3.2", + "foreign-types", "libc", "once_cell", "openssl-macros", @@ -2363,6 +2257,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "orbclient" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" +dependencies = [ + "libredox", +] + [[package]] name = "ordered-float" version = "4.2.0" @@ -2399,7 +2302,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.1", "smallvec", "windows-targets 0.52.5", ] @@ -2411,7 +2314,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c46e77bfaf70d3f26dd0615dfab06a39f17ef2ae989bad44561318f47997ca7" dependencies = [ "approx 0.5.1", - "arrayvec 0.7.4", + "arrayvec", "bitflags 1.3.2", "downcast-rs", "either", @@ -2658,15 +2561,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" -[[package]] -name = "raw-window-handle" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" -dependencies = [ - "cty", -] - [[package]] name = "raw-window-handle" version = "0.5.2" @@ -2699,6 +2593,24 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.5.1" @@ -2845,15 +2757,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "safe_arch" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" -dependencies = [ - "bytemuck", -] - [[package]] name = "safe_arch" version = "0.7.1" @@ -2895,12 +2798,13 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.4.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" +checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" dependencies = [ - "crossfont", + "ab_glyph", "log", + "memmap2", "smithay-client-toolkit", "tiny-skia", ] @@ -3004,33 +2908,12 @@ version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" dependencies = [ - "darling 0.20.9", + "darling", "proc-macro2", "quote", "syn 2.0.66", ] -[[package]] -name = "servo-fontconfig" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" -dependencies = [ - "libc", - "servo-fontconfig-sys", -] - -[[package]] -name = "servo-fontconfig-sys" -version = "5.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" -dependencies = [ - "expat-sys", - "freetype-sys", - "pkg-config", -] - [[package]] name = "shlex" version = "1.3.0" @@ -3171,10 +3054,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "strsim" -version = "0.10.0" +name = "strict-num" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" [[package]] name = "strsim" @@ -3326,27 +3209,27 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.7.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" +checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" dependencies = [ "arrayref", - "arrayvec 0.5.2", + "arrayvec", "bytemuck", "cfg-if", "png", - "safe_arch 0.5.2", "tiny-skia-path", ] [[package]] name = "tiny-skia-path" -version = "0.7.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" +checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" dependencies = [ "arrayref", "bytemuck", + "strict-num", ] [[package]] @@ -3386,7 +3269,7 @@ dependencies = [ "fast-math", "ffmpeg-next", "log", - "num_enum", + "num_enum 0.5.11", "tempfile", ] @@ -3624,7 +3507,7 @@ dependencies = [ "color_space", "criterion", "crossbeam-channel", - "egui 0.19.0", + "egui 0.21.0", "egui_wgpu_backend", "egui_winit_platform", "env_logger", @@ -3656,6 +3539,7 @@ dependencies = [ "thiserror", "tmc2rs", "tokio", + "web-sys", "wgpu", "wgpu_glyph", "winit", @@ -3843,17 +3727,20 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" -version = "0.13.1" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "277e967bf8b7820a76852645a6bce8bbd31c32fda2042e82d8e3ea75fda8892d" +checksum = "d745a1b6d91d85c33defbb29f0eee0450e1d2614d987e14bf6baf26009d132d7" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", + "cfg-if", "js-sys", "log", "naga", "parking_lot", - "raw-window-handle 0.4.3", + "profiling", + "raw-window-handle", "smallvec", + "static_assertions", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3864,22 +3751,20 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.13.2" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b92788dec9d0c1bed849a1b83f01b2ee12819bf04a79c90f68e4173f7b5ba2" +checksum = "7131408d940e335792645a98f03639573b0480e9e2e7cddbbab74f7c6d9f3fff" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "bit-vec", "bitflags 1.3.2", - "cfg_aliases", "codespan-reporting", - "copyless", "fxhash", "log", "naga", "parking_lot", "profiling", - "raw-window-handle 0.4.3", + "raw-window-handle", "smallvec", "thiserror", "web-sys", @@ -3889,26 +3774,28 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.13.2" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cbdfc3d0637dba3d5536b93adef3d26023a0b96f0e1ee5ee9560a401d9f646" +checksum = "bdcf61a283adc744bb5453dd88ea91f3f86d5ca6b027661c6c73c7734ae0288b" dependencies = [ "android_system_properties", - "arrayvec 0.7.4", + "arrayvec", "ash", "bit-set", "bitflags 1.3.2", "block", "core-graphics-types", "d3d12", - "foreign-types 0.3.2", + "foreign-types", "fxhash", "glow", "gpu-alloc", + "gpu-allocator", "gpu-descriptor", - "inplace_it", + "hassle-rs", "js-sys", "khronos-egl", + "libc", "libloading 0.7.4", "log", "metal", @@ -3917,8 +3804,9 @@ dependencies = [ "parking_lot", "profiling", "range-alloc", - "raw-window-handle 0.4.3", + "raw-window-handle", "renderdoc-sys", + "smallvec", "thiserror", "wasm-bindgen", "web-sys", @@ -3928,18 +3816,20 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.13.2" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f762cbc08e1a51389859cf9c199c7aef544789cf3510889aab12c607f701604" +checksum = "32444e121b0bd00cb02c0de32fde457a9491bd44e03e7a5db6df9b1da2f6f110" dependencies = [ "bitflags 1.3.2", + "js-sys", + "web-sys", ] [[package]] name = "wgpu_glyph" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362152ff06b11372ddfdfc706606fb0f3b6f1b540f017675443a61d074a0a5df" +checksum = "e25440d5f32ec39de49c57c15c2d3f9133a7939b069b5ad07e5afd8b78fb8adc" dependencies = [ "bytemuck", "glyph_brush", @@ -3954,9 +3844,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd8dc749a1b03f3c255a3064a4f5c0ee5ed09b7c6bc6d4525d31f779cd74d7fc" dependencies = [ "bytemuck", - "safe_arch 0.7.1", + "safe_arch", ] +[[package]] +name = "widestring" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" + [[package]] name = "winapi" version = "0.3.9" @@ -3988,6 +3884,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -3999,15 +3904,11 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows-targets 0.42.2", ] [[package]] @@ -4028,6 +3929,21 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -4059,6 +3975,12 @@ dependencies = [ "windows_x86_64_msvc 0.52.5", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -4073,9 +3995,9 @@ checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" @@ -4091,9 +4013,9 @@ checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" @@ -4115,9 +4037,9 @@ checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" @@ -4133,9 +4055,9 @@ checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" @@ -4149,6 +4071,12 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4163,9 +4091,9 @@ checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" @@ -4181,34 +4109,36 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winit" -version = "0.27.5" +version = "0.28.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" +checksum = "9596d90b45384f5281384ab204224876e8e8bf7d58366d9b795ad99aa9894b94" dependencies = [ + "android-activity", "bitflags 1.3.2", - "cocoa 0.24.1", + "cfg_aliases", "core-foundation", - "core-graphics 0.22.3", + "core-graphics", "dispatch", "instant", "libc", "log", "mio", "ndk", - "ndk-glue", - "objc", + "objc2", "once_cell", - "parking_lot", + "orbclient", "percent-encoding", - "raw-window-handle 0.4.3", - "raw-window-handle 0.5.2", + "raw-window-handle", + "redox_syscall 0.3.5", "sctk-adwaita", "smithay-client-toolkit", "wasm-bindgen", "wayland-client", + "wayland-commons", "wayland-protocols", + "wayland-scanner", "web-sys", - "windows-sys 0.36.1", + "windows-sys 0.45.0", "x11-dl", ] @@ -4231,15 +4161,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "wio" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" -dependencies = [ - "winapi", -] - [[package]] name = "x11-dl" version = "2.21.0" diff --git a/Cargo.toml b/Cargo.toml index 95547c7..1fa5684 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,13 +64,14 @@ serde_with = { version = "3.0.0" } crossbeam-channel = "0.5.6" # For GUI Rendering -winit = { version = "0.27.3" } -wgpu = { version = "0.13.1" } -wgpu_glyph = { version = "0.17.0" } -egui = { version = "0.19.0" } -egui_winit_platform = { version = "0.16.0" } -egui_wgpu_backend = { version = "0.19.0" } -epi = { version = "0.17.0" } +winit = { version = "0.28" } # Need this for fix Sonoma bug with window size +wgpu = { version = "0.15" } # Need by egui_wgpu_backend 0.22 +wgpu_glyph = { version = "0.19" } # Need this for wgpu 0.15 +egui = { version = "0.21" } # Need this for egui_winit_platform 0.18 +egui_winit_platform = { version = "^0.18" } # Need this for winit 0.28 onwards +egui_wgpu_backend = { version = "0.22" } # Need this for egui 0.21 +epi = { version = "0.17" } +web-sys = { version = "0.3.64" } # ffmpeg-next = "6" ffmpeg-next = { version = "6", optional = true } @@ -99,15 +100,15 @@ name = "vvplay" # [[bin]] # name = "vvdash" -[[bin]] -name = "vv" +#[[bin]] +#name = "vv" -[[bin]] -name = "vvplay_async" +#[[bin]] +#name = "vvplay_async" # required-features = ["dash"] -[[bin]] -name = "exporter" +#[[bin]] +#name = "exporter" [features] default = ["with-tmc2-rs-decoder", "async" ] diff --git a/src/bin/vvplay.rs b/src/bin/vvplay.rs index 0622c49..cf64fdf 100644 --- a/src/bin/vvplay.rs +++ b/src/bin/vvplay.rs @@ -14,10 +14,13 @@ struct Args { /// 1. Directory with all the pcd files in lexicographical order /// 2. location of the mpd file src: String, - #[clap(short = 'q', long, default_value_t = 0)] + + #[clap(short, long, default_value_t = 0)] quality: u8, + #[clap(short, long, default_value_t = 30.0)] fps: f32, + #[clap( short = 'x', long, @@ -25,6 +28,7 @@ struct Args { allow_negative_numbers = true )] camera_x: f32, + #[clap( short = 'y', long, @@ -32,6 +36,7 @@ struct Args { allow_negative_numbers = true )] camera_y: f32, + #[clap( short = 'z', long, @@ -39,26 +44,37 @@ struct Args { allow_negative_numbers = true )] camera_z: f32, + #[clap(long = "yaw", default_value_t = -90.0, allow_negative_numbers = true)] camera_yaw: f32, + #[clap(long = "pitch", default_value_t = 0.0, allow_negative_numbers = true)] camera_pitch: f32, + #[clap(short = 'W', long, default_value_t = 1600)] width: u32, + #[clap(short = 'H', long, default_value_t = 900)] height: u32, + #[clap(long = "controls", default_value_t = true)] show_controls: bool, + #[clap(short, long)] buffer_size: Option, + #[clap(short, long)] metrics: Option, + #[clap(long = "decoder", value_enum, default_value_t = DecoderType::Noop)] decoder_type: DecoderType, + #[clap(long)] decoder_path: Option, + #[clap(long, default_value = "rgb(255,255,255)")] bg_color: OsString, + #[clap(long, default_value = "false")] adaptive_upsampling: bool, } diff --git a/src/reconstruct/poisson_reconstruction/hgrid.rs b/src/reconstruct/poisson_reconstruction/hgrid.rs index 89f1e3b..9e85d90 100644 --- a/src/reconstruct/poisson_reconstruction/hgrid.rs +++ b/src/reconstruct/poisson_reconstruction/hgrid.rs @@ -31,10 +31,7 @@ impl BuildHasher for DeterministicState { /// A grid based on spacial hashing. #[derive(PartialEq, Debug, Clone)] -#[cfg_attr( - feature = "serde-serialize", - derive(serde::Serialize, serde::Deserialize) -)] +// #[cfg_attr(derive(serde::Serialize, serde::Deserialize),)] pub struct HGrid { cells: HashMap, Vec, DeterministicState>, origin: Point3, diff --git a/src/render/wgpu/builder.rs b/src/render/wgpu/builder.rs index c1bfcd8..23808ce 100644 --- a/src/render/wgpu/builder.rs +++ b/src/render/wgpu/builder.rs @@ -1,7 +1,7 @@ use crate::render::wgpu::camera::Camera; use std::collections::HashMap; use winit::dpi::PhysicalSize; -use winit::event::{ElementState, Event, KeyboardInput, VirtualKeyCode, WindowEvent}; +use winit::event::{ElementState, Event, KeyboardInput, MouseButton, VirtualKeyCode, WindowEvent}; use winit::event_loop::{ControlFlow, EventLoop, EventLoopBuilder}; use winit::window::{Window, WindowId}; @@ -102,6 +102,7 @@ impl RenderBuilder { } pub fn run(mut self) { + // The main event loop of vvplay self.event_loop.run(move |new_event, _, control_flow| { *control_flow = ControlFlow::Poll; match &new_event { @@ -128,6 +129,7 @@ impl RenderBuilder { WindowEvent::CloseRequested | WindowEvent::Destroyed | WindowEvent::KeyboardInput { + // ESC quits vvplay input: KeyboardInput { state: ElementState::Pressed, @@ -139,21 +141,34 @@ impl RenderBuilder { *control_flow = ControlFlow::Exit; } WindowEvent::Resized(physical_size) => { - #[cfg(target_os = "macos")] - if physical_size.width == u32::MAX - || physical_size.height == u32::MAX - { - // HACK to fix a bug on Macos 14 - // https://github.com/rust-windowing/winit/issues/2876 - return; - } windowed_object.object.resize(*physical_size); + if windowed_object.focused { + windowed_object + .object + .handle_event(&new_event, &windowed_object.window) + } } WindowEvent::ScaleFactorChanged { new_inner_size, .. } => { windowed_object.object.resize(**new_inner_size); } - WindowEvent::Focused(focus) => windowed_object.focused = *focus, + WindowEvent::Focused(focus) => { + windowed_object.focused = *focus; + } + WindowEvent::MouseInput { + button: MouseButton::Left, + .. + } => { + // self.mouse_pressed = *state == ElementState::Pressed; + // true + if windowed_object.focused { + windowed_object + .object + .handle_event(&new_event, &windowed_object.window) + } + } _ => { + // For all other events, we pass them to the focused window + // Continue in renderer.rs if windowed_object.focused { windowed_object .object diff --git a/src/render/wgpu/camera.rs b/src/render/wgpu/camera.rs index 7871c42..e3616ed 100644 --- a/src/render/wgpu/camera.rs +++ b/src/render/wgpu/camera.rs @@ -103,13 +103,19 @@ impl CameraState { } } - pub fn process_input(&mut self, event: &DeviceEvent) -> bool { + pub fn handle_keyboard_input(&mut self, event: &DeviceEvent) -> bool { match event { DeviceEvent::Key(KeyboardInput { virtual_keycode: Some(key), state, .. }) => self.camera_controller.process_keyboard(*key, *state), + _ => false, + } + } + + pub fn handle_mouse_input(&mut self, event: &DeviceEvent) -> bool { + match event { DeviceEvent::MouseWheel { delta, .. } => { self.camera_controller.process_scroll(delta); true diff --git a/src/render/wgpu/controls.rs b/src/render/wgpu/controls.rs index 47b3446..8b76230 100644 --- a/src/render/wgpu/controls.rs +++ b/src/render/wgpu/controls.rs @@ -54,7 +54,7 @@ impl Attachable for Controller { let gpu = pollster::block_on(WindowGpu::new(&window)); - let surface_format = gpu.surface.get_supported_formats(&gpu.adapter)[0]; + let surface_format = gpu.surface.get_capabilities(&gpu.adapter).formats[0]; let event_proxy = Arc::new(EventProxy( std::sync::Mutex::new(event_loop.create_proxy()), diff --git a/src/render/wgpu/gpu.rs b/src/render/wgpu/gpu.rs index 7055c0b..05e9918 100644 --- a/src/render/wgpu/gpu.rs +++ b/src/render/wgpu/gpu.rs @@ -1,3 +1,4 @@ +use wgpu::InstanceDescriptor; use winit::window::Window; pub struct WindowGpu { @@ -14,12 +15,12 @@ impl WindowGpu { let size = window.inner_size(); // The instance is a handle to our GPU // Backends::all => Vulkan + Metal + DX12 + Browser WebGPU - let instance = wgpu::Instance::new(wgpu::Backends::all()); + let instance = wgpu::Instance::new(InstanceDescriptor::default()); // The surface is the part of the window that we draw to. // // Safety!: The surface needs to live as long as the window that created it. - let surface = unsafe { instance.create_surface(window) }; + let surface = unsafe { instance.create_surface(window).unwrap() }; // The adapter is a handle to our actual graphics card. let adapter = instance .request_adapter(&wgpu::RequestAdapterOptions { @@ -46,13 +47,16 @@ impl WindowGpu { .unwrap(); // config defines how the surface creates its underlying `SurfaceTexture` + let surface_caps = surface.get_capabilities(&adapter); let config = wgpu::SurfaceConfiguration { usage: wgpu::TextureUsages::RENDER_ATTACHMENT, // wgpu::TextureFormat::Bgra8UnormSrgb, - format: surface.get_supported_formats(&adapter)[0], + format: surface_caps.formats[0], width: size.width, height: size.height, present_mode: wgpu::PresentMode::Fifo, + alpha_mode: surface_caps.alpha_modes[0], + view_formats: vec![], // new 0.15 }; surface.configure(&device, &config); @@ -69,6 +73,7 @@ impl WindowGpu { /// Reconfigure the surface every time the window's size changes pub fn resize(&mut self, new_size: winit::dpi::PhysicalSize) { if new_size.width > 0 && new_size.height > 0 { + // print!("WindowGpu::resize {:#?}\n", new_size); self.size = new_size; self.config.width = new_size.width; self.config.height = new_size.height; diff --git a/src/render/wgpu/png.rs b/src/render/wgpu/png.rs index 4a98f2a..4901fa7 100644 --- a/src/render/wgpu/png.rs +++ b/src/render/wgpu/png.rs @@ -7,7 +7,7 @@ use std::ffi::OsString; use std::num::NonZeroU32; use std::path::Path; use std::str::FromStr; -use wgpu::{Buffer, Device, Queue, Texture, TextureDescriptor, TextureView}; +use wgpu::{Buffer, Device, InstanceDescriptor, Queue, Texture, TextureDescriptor, TextureView}; use winit::dpi::PhysicalSize; use super::camera::CameraPosition; @@ -76,7 +76,7 @@ impl<'a> PngWriter<'a> { std::fs::create_dir_all(output_path).expect("Failed to create output directory"); let size = PhysicalSize::new(width, height); - let instance = wgpu::Instance::new(wgpu::Backends::all()); + let instance = wgpu::Instance::new(InstanceDescriptor::default()); let adapter = pollster::block_on(instance.request_adapter(&wgpu::RequestAdapterOptions { power_preference: wgpu::PowerPreference::default(), compatible_surface: None, @@ -97,6 +97,7 @@ impl<'a> PngWriter<'a> { sample_count: 1, dimension: wgpu::TextureDimension::D2, format: wgpu::TextureFormat::Rgba8UnormSrgb, + view_formats: &[], usage: wgpu::TextureUsages::COPY_SRC | wgpu::TextureUsages::RENDER_ATTACHMENT, label: None, }; diff --git a/src/render/wgpu/renderable/mod.rs b/src/render/wgpu/renderable/mod.rs index 3f7fba2..f5934b7 100644 --- a/src/render/wgpu/renderable/mod.rs +++ b/src/render/wgpu/renderable/mod.rs @@ -34,6 +34,7 @@ pub trait Renderable: Clone { sample_count: 1, dimension: TextureDimension::D2, format: TextureFormat::Depth32Float, + view_formats: &[], usage: TextureUsages::RENDER_ATTACHMENT, }); @@ -192,6 +193,7 @@ impl Renderable for PointCloud { sample_count: 1, dimension: TextureDimension::D2, format: TextureFormat::Depth32Float, + view_formats: &[], usage: TextureUsages::RENDER_ATTACHMENT, }); diff --git a/src/render/wgpu/renderer.rs b/src/render/wgpu/renderer.rs index 25b7167..a05b0b2 100644 --- a/src/render/wgpu/renderer.rs +++ b/src/render/wgpu/renderer.rs @@ -5,6 +5,7 @@ use crate::render::wgpu::camera::{Camera, CameraState, CameraUniform}; use crate::render::wgpu::gpu::WindowGpu; use crate::render::wgpu::render_manager::RenderManager; use log::debug; +// use std::f16::consts::E; use std::iter; use std::marker::PhantomData; use std::time::{Duration, Instant}; @@ -15,8 +16,11 @@ use wgpu::{ TextureView, }; use wgpu_glyph::{ab_glyph, GlyphBrush, GlyphBrushBuilder, Section, Text}; -use winit::dpi::{PhysicalPosition, PhysicalSize}; -use winit::event::{DeviceEvent, ElementState, Event, KeyboardInput, VirtualKeyCode, WindowEvent}; +// use winit::dpi::{PhysicalPosition, PhysicalSize}; +use winit::dpi::PhysicalSize; +use winit::event::{ + DeviceEvent, ElementState, Event, KeyboardInput, MouseButton, VirtualKeyCode, WindowEvent, +}; use winit::event_loop::{EventLoop, EventLoopProxy}; use winit::window::{Window, WindowBuilder, WindowId}; @@ -143,12 +147,13 @@ where fn attach(self, event_loop: &EventLoop) -> (Self::Output, Window) { let window = WindowBuilder::new() - .with_title("Point Cloud Renderer") - .with_position(PhysicalPosition { x: 0, y: 0 }) + .with_title("vvplay") + // .with_position(PhysicalPosition { x: 0, y: 0 }) .with_resizable(true) - .with_min_inner_size(self.size) + // .with_min_inner_size(self.size) .with_max_inner_size(PhysicalSize::new(2048, 2048)) - // .with_inner_size(self.size) + .with_inner_size(self.size) + .with_active(true) .build(event_loop) .unwrap(); @@ -176,6 +181,9 @@ where event_proxy: EventLoopProxy, last_render_time: Option, listeners: Vec, + mouse_in_window: bool, + mouse_pressed: bool, + resizing: bool, // GPU variables gpu: WindowGpu, @@ -208,17 +216,70 @@ where fn handle_event(&mut self, event: &Event, window: &Window) { match event { - Event::DeviceEvent { ref event, .. } => { - if let winit::event::DeviceEvent::Key(_) = event { - return; + Event::DeviceEvent { ref event, .. } => match event { + DeviceEvent::MouseWheel { .. } => { + self.camera_state.handle_mouse_input(event); } - self.handle_device_event(event); - } + DeviceEvent::Key { .. } => { + self.camera_state.handle_keyboard_input(event); + self.handle_keyboard_input(event); + } + _ => { + if self.mouse_in_window && !self.resizing && self.mouse_pressed { + self.camera_state.handle_mouse_input(event); + } + } + }, Event::WindowEvent { event: WindowEvent::KeyboardInput { input, .. }, window_id, } if *window_id == window.id() => { - self.handle_device_event(&DeviceEvent::Key(*input)); + self.camera_state + .handle_keyboard_input(&DeviceEvent::Key(*input)); + self.handle_keyboard_input(&DeviceEvent::Key(*input)); + } + Event::WindowEvent { event, window_id } if *window_id == window.id() => { + match event { + WindowEvent::CursorEntered { .. } => { + self.mouse_in_window = true; + } + WindowEvent::CursorLeft { .. } => { + self.mouse_in_window = false; + } + // we need to keep track of mouse click/drag that is related to + // resizing the window. We can tell if the user is resizing when + // we received the resizing message and the mouse button is pressed. + WindowEvent::Resized { .. } => { + if self.mouse_pressed { + // Resize event is received when the window is first created, so need to + // cross check with mouse button pressed to determine if the user is resizing. + self.resizing = true; + } + } + WindowEvent::MouseInput { state, button, .. } => { + if *state == ElementState::Released && *button == MouseButton::Left { + self.mouse_pressed = false; + } else if *state == ElementState::Pressed && *button == MouseButton::Left { + self.mouse_pressed = true; + } + // mouse must be in window since we received the mouse event + self.mouse_in_window = true; + // Assuming that users only resize with mouse drag, when user release the button, + // resizing is done. + if self.resizing && !self.mouse_pressed { + self.resizing = false; + // not passing this mouse button release to camera control since this is the + // last of a resize operation + } else { + // pass the rest to camera control + self.camera_state.handle_mouse_input(&DeviceEvent::Button { + button: 1, + state: *state, + }); + } + } + _ => {} + } } Event::RedrawRequested(window_id) if *window_id == window.id() => { if self.last_render_time.is_none() { @@ -288,6 +349,9 @@ where event_proxy, listeners: Vec::new(), last_render_time: None, + mouse_in_window: false, + mouse_pressed: false, + resizing: false, gpu, pcd_renderer, @@ -370,8 +434,7 @@ where } } - fn handle_device_event(&mut self, event: &DeviceEvent) { - self.camera_state.process_input(event); + fn handle_keyboard_input(&mut self, event: &DeviceEvent) { if let DeviceEvent::Key(KeyboardInput { virtual_keycode: Some(key), state, @@ -576,8 +639,6 @@ where pub fn update_vertices(&mut self, device: &Device, queue: &Queue, data: &T) { let vertices = data.num_vertices(); if vertices > self.num_vertices { - // print!("creating new device"); - self.vertex_buffer.destroy(); self.vertex_buffer = data.create_buffer(device); } else {