diff --git a/gloom-rs/.gitattributes b/gloom-rs/.gitattributes new file mode 100644 index 0000000..af5aa2c --- /dev/null +++ b/gloom-rs/.gitattributes @@ -0,0 +1,4 @@ +* text=auto + +*.sh text eol=lf +*.bat text eol=crlf diff --git a/gloom-rs/.gitignore b/gloom-rs/.gitignore new file mode 100644 index 0000000..ce22535 --- /dev/null +++ b/gloom-rs/.gitignore @@ -0,0 +1,5 @@ +/target +/.vscode +*.pdf +*.html +source.zip diff --git a/gloom-rs/Cargo.lock b/gloom-rs/Cargo.lock new file mode 100644 index 0000000..2208438 --- /dev/null +++ b/gloom-rs/Cargo.lock @@ -0,0 +1,2000 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arrayref" +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 = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "bytemuck" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "calloop" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" +dependencies = [ + "bitflags", + "log", + "nix 0.25.1", + "slotmap", + "thiserror", + "vec_map", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + +[[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", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" +dependencies = [ + "bitflags", + "block", + "core-foundation", + "core-graphics-types", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "core-graphics" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +dependencies = [ + "bitflags", + "core-foundation", + "core-graphics-types", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" +dependencies = [ + "bitflags", + "core-foundation", + "libc", +] + +[[package]] +name = "core-text" +version = "19.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" +dependencies = [ + "core-foundation", + "core-graphics", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.0", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossfont" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" +dependencies = [ + "cocoa", + "core-foundation", + "core-foundation-sys", + "core-graphics", + "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 = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[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", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.0", +] + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dwrote" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" +dependencies = [ + "lazy_static", + "libc", + "serde", + "serde_derive", + "winapi", + "wio", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[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.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1e481eb11a482815d3e9d618db8c42a93207134662873809335a92327440c18" +dependencies = [ + "bit_field", + "flume", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + +[[package]] +name = "fdeflate" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "flate2" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flume" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "pin-project", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +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.32", +] + +[[package]] +name = "foreign-types-shared" +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 = "freetype-rs" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" +dependencies = [ + "bitflags", + "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-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gif" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gl" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a94edab108827d67608095e269cf862e60d920f144a5026d3dbcfd8b877fb404" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "gloom-rs" +version = "0.3.0" +dependencies = [ + "gl", + "glutin", + "image", + "libc", + "nalgebra-glm", + "rand", + "tobj", +] + +[[package]] +name = "glutin" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444c9ad294fdcaf20ccf6726b78f380b5450275540c9b68ab62f49726ad1c713" +dependencies = [ + "cgl", + "cocoa", + "core-foundation", + "glutin_egl_sys", + "glutin_gles2_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading 0.7.4", + "log", + "objc", + "once_cell", + "osmesa-sys", + "parking_lot", + "raw-window-handle 0.5.2", + "wayland-client", + "wayland-egl", + "winapi", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68900f84b471f31ea1d1355567eb865a2cf446294f06cef8d653ed7bcf5f013d" +dependencies = [ + "gl_generator", + "winapi", +] + +[[package]] +name = "glutin_gles2_sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094e708b730a7c8a1954f4f8a31880af00eb8a1c5b5bf85d28a0a3c6d69103" +dependencies = [ + "gl_generator", + "objc", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93d0575865098580c5b3a423188cd959419912ea60b1e48e8b3b526f6d02468" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3da5951a1569dbab865c6f2a863efafff193a93caf05538d193e9e3816d21696" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "half" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "image" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "exr", + "gif", + "jpeg-decoder", + "num-rational", + "num-traits", + "png", + "qoi", + "tiff", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jpeg-decoder" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +dependencies = [ + "rayon", +] + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libloading" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d580318f95776505201b28cf98eb1fa5e4be3b689633ba6a3e6cd880ff22d8cb" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "nalgebra" +version = "0.31.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20bd243ab3dbb395b39ee730402d2e5405e448c75133ec49cc977762c4cba3d1" +dependencies = [ + "approx", + "matrixmultiply", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", +] + +[[package]] +name = "nalgebra-glm" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8e68654c920c582d34a4180c527ce2acf9ec8c695363681ff42acde46239d43" +dependencies = [ + "approx", + "nalgebra", + "num-traits", + "simba", +] + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom", +] + +[[package]] +name = "ndk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +dependencies = [ + "bitflags", + "jni-sys", + "ndk-sys", + "num_enum", + "raw-window-handle 0.5.2", + "thiserror", +] + +[[package]] +name = "ndk-context" +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", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ndk-sys" +version = "0.4.1+23.1.7779620" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +dependencies = [ + "autocfg", + "bitflags", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-complex" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "osmesa-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" +dependencies = [ + "shared_library", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "png" +version = "0.17.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +dependencies = [ + "bitflags", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" +dependencies = [ + "crossfont", + "log", + "smithay-client-toolkit", + "tiny-skia", +] + +[[package]] +name = "serde" +version = "1.0.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + +[[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 = "shared_library" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" +dependencies = [ + "lazy_static", + "libc", +] + +[[package]] +name = "simba" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3fd720c48c53cace224ae62bef1bbff363a70c68c4802a78b5cc6159618176" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "slotmap" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "smithay-client-toolkit" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +dependencies = [ + "bitflags", + "calloop", + "dlib", + "lazy_static", + "log", + "memmap2", + "nix 0.24.3", + "pkg-config", + "wayland-client", + "wayland-cursor", + "wayland-protocols", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + +[[package]] +name = "tiff" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + +[[package]] +name = "tiny-skia" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "png", + "safe_arch 0.5.2", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" +dependencies = [ + "arrayref", + "bytemuck", +] + +[[package]] +name = "tobj" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3bd4ba05f29e4c65b6c0c11a58b6465ffa820bac890d76ad407b4e81d8372e8" +dependencies = [ + "ahash", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.32", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "wayland-client" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +dependencies = [ + "bitflags", + "downcast-rs", + "libc", + "nix 0.24.3", + "scoped-tls", + "wayland-commons", + "wayland-scanner", + "wayland-sys", +] + +[[package]] +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix 0.24.3", + "once_cell", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-cursor" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +dependencies = [ + "nix 0.24.3", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-egl" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402de949f81a012926d821a2d659f930694257e76dd92b6e0042ceb27be4107d" +dependencies = [ + "wayland-client", + "wayland-sys", +] + +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "weezl" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" + +[[package]] +name = "wide" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +dependencies = [ + "bytemuck", + "safe_arch 0.7.1", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +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", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "winit" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" +dependencies = [ + "bitflags", + "cocoa", + "core-foundation", + "core-graphics", + "dispatch", + "instant", + "libc", + "log", + "mio", + "ndk", + "ndk-glue", + "objc", + "once_cell", + "parking_lot", + "percent-encoding", + "raw-window-handle 0.4.3", + "raw-window-handle 0.5.2", + "sctk-adwaita", + "smithay-client-toolkit", + "wasm-bindgen", + "wayland-client", + "wayland-protocols", + "web-sys", + "windows-sys 0.36.1", + "x11-dl", +] + +[[package]] +name = "winnow" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +dependencies = [ + "memchr", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "xcursor" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" +dependencies = [ + "nom", +] + +[[package]] +name = "xml-rs" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] diff --git a/gloom-rs/Cargo.toml b/gloom-rs/Cargo.toml new file mode 100644 index 0000000..29f0ad8 --- /dev/null +++ b/gloom-rs/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "gloom-rs" +version = "0.3.0" +authors = [ + "Peder b. Sundt ", + "Michael H. Gimle ", +] +edition = "2018" # rust edition + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +glutin = "0.29.1" +gl = "0.14.0" +tobj = ">3.1.0" +image = "0.24.3" +nalgebra-glm = "0.17.0" +rand = "0.8.4" +libc = "0.2.132" diff --git a/gloom-rs/README.md b/gloom-rs/README.md new file mode 100644 index 0000000..8d0c6a6 --- /dev/null +++ b/gloom-rs/README.md @@ -0,0 +1,55 @@ +# Gloom-rs + +To get started, make sure you have `git`, `cargo` and, `rustc` installed and available. + + git clone https://github.com/pbsds/gloom-rs + cd gloom-rs + cargo run + + +## GLM + +We use a variant of GLM known as [nalgebra-glm](https://docs.rs/nalgebra-glm/0.15.0/nalgebra_glm/), which differs *slightly* from the standard GLM library. + + +## Report + +You're free to write your report any way you'd like, as long as it is delivered as a PDF file. + +To spread the gospel, I have included a `pandoc` report skeleton in the `report` folder. +To use pandoc, make sure you have `pandoc` installed along with a supported latex engine. +Make sure it works before using it to write your report. + +## Cybele + +If you're using the lab computers in Cybele, you will be using a network-mounted home directory which is subject to both low quotas and high latency. +To speed up your work we highly reccomend running the following, to put the build directory in RAM rather than on disk: + +```shell +test -d target/ && rm -rf target/ +ln -s /dev/shm target +``` + +## Code delivery + +We want the following files and folders to be delivered in a ZIP file: + +* `resources` +* `shaders` +* `src` +* `Cargo.lock` +* `Cargo.toml` + +**Important:** Do not include the `target` folder! + +To automatically make an archive (`source.zip`) ready for uploading to blackboard: + +* Make sure any extra assets or resources you might have added are located in the `resources` folder +* Then run either: + * `./create_code_archive_for_blackboard_LINUX.sh` + * `create_code_archive_for_blackboard_WINDOWS.bat`. + +This zip script will explicitly ignore the `target` folder, and the following two of the files given as a handout for exercise 3 (just to save space): + +* `resources/helicopter.obj` +* `resources/lunarsurface.obj` diff --git a/gloom-rs/create_code_archive_for_blackboard_LINUX.sh b/gloom-rs/create_code_archive_for_blackboard_LINUX.sh new file mode 100755 index 0000000..6ec0439 --- /dev/null +++ b/gloom-rs/create_code_archive_for_blackboard_LINUX.sh @@ -0,0 +1,13 @@ +#!/bin/sh +if test -f source.zip; then + rm -v source.zip +fi +zip -r source.zip \ + Cargo.lock \ + Cargo.toml \ + src \ + shaders \ + resources/* \ + -x"resources/helicopter.obj" \ + -x"resources/lunarsurface.obj" \ + -x"resources/.gitkeep" diff --git a/gloom-rs/create_code_archive_for_blackboard_WINDOWS.bat b/gloom-rs/create_code_archive_for_blackboard_WINDOWS.bat new file mode 100644 index 0000000..375561a --- /dev/null +++ b/gloom-rs/create_code_archive_for_blackboard_WINDOWS.bat @@ -0,0 +1,14 @@ + +if exist source.zip ( + del source.zip +) +"%~dp0/vendor/7za.exe" -tzip a source.zip ^ + Cargo.lock ^ + Cargo.toml ^ + src ^ + shaders ^ + resources/* ^ + -x!resources/helicopter.obj ^ + -x!resources/lunarsurface.obj ^ + -x!resources/.gitkeep +pause diff --git a/gloom-rs/report/.envrc b/gloom-rs/report/.envrc new file mode 100644 index 0000000..d5b5c07 --- /dev/null +++ b/gloom-rs/report/.envrc @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# this file is automatically loaded by `direnv`, if installed + +use nix # this will load the file `shell.nix` diff --git a/gloom-rs/report/Makefile b/gloom-rs/report/Makefile new file mode 100644 index 0000000..317757a --- /dev/null +++ b/gloom-rs/report/Makefile @@ -0,0 +1,31 @@ +PANDOC_ARGS += --verbose +PANDOC_ARGS += --highlight-style=pygments # the default theme + +# Optional filters, needs be installed separately: + +#PANDOC_ARGS += --filter pandoc-include +#PANDOC_ARGS += --filter pandoc-include-code +#PANDOC_ARGS += --filter pandoc-imagine +#PANDOC_ARGS += --filter pandoc-crossref +#PANDOC_ARGS += --filter include-files.lua # this only works in the nix environment +#PANDOC_ARGS += --filter include-code-files.lua # this only works in the nix environment + +.PHONY: help +help: + @echo "try running 'make template.pdf'" + +.PHONY: has-% +has-%: + @command -v $* >/dev/null || ( \ + echo "ERROR: Command '$*' not found! Make sure it is installed and available in PATH"; \ + false; \ + ) >&2 + +%.pdf: %.md Makefile | has-pandoc + pandoc -i $< ${PANDOC_ARGS} -o $@ #--pdf-engine=pdflatex + +%.tex: %.md Makefile | has-pandoc + pandoc -i $< ${PANDOC_ARGS} -o $@ --standalone + +%.html: %.md Makefile | has-pandoc + pandoc -i $< ${PANDOC_ARGS} -o $@ --katex --standalone --self-contained diff --git a/gloom-rs/report/README.md b/gloom-rs/report/README.md new file mode 100644 index 0000000..bcdad46 --- /dev/null +++ b/gloom-rs/report/README.md @@ -0,0 +1,14 @@ +To use this skeleton, install [pandoc](https://pandoc.org/installing.html). +We provide a working nix shell for those familiar with nix. + +To compile `myfile.md` to PDF on linux, run: + + make myfile.pdf + +To compile and view our provided example, `template.md`, run: + + make template.pdf + +On Windows, use pandoc directly: + + pandoc template.md -o template.pdf diff --git a/gloom-rs/report/images/logo.png b/gloom-rs/report/images/logo.png new file mode 100644 index 0000000..f4533dc Binary files /dev/null and b/gloom-rs/report/images/logo.png differ diff --git a/gloom-rs/report/shell.nix b/gloom-rs/report/shell.nix new file mode 100644 index 0000000..d4c6b31 --- /dev/null +++ b/gloom-rs/report/shell.nix @@ -0,0 +1,31 @@ +# This virtual environment may be loaded with the command `nix-shell` +# it require that you have nix installed, and nixpkgs configured as the a channel +{ pkgs ? import {} }: + +pkgs.mkShell { + buildInputs = with pkgs; [ + + # pandoc and pandoc-lua-filters + + (pkgs.writeShellScriptBin "pandoc" '' + export XDG_DATA_HOME=${pandoc-lua-filters}/share + exec ${pkgs.pandoc}/bin/pandoc "$@" + '') + + # optional pandoc filters: + + #pandoc-include + #pandoc-imagine + #haskellPackages.pandoc-crossref + #haskellPackages.pandoc-include-code + + # latex environment + + (texlive.combine { inherit (texlive) + scheme-small + fontaxes + atkinson + ;}) + + ]; +} diff --git a/gloom-rs/report/template.md b/gloom-rs/report/template.md new file mode 100644 index 0000000..3a43254 --- /dev/null +++ b/gloom-rs/report/template.md @@ -0,0 +1,120 @@ +--- +# This is a YAML preamble, defining pandoc meta-variables. +# Reference: https://pandoc.org/MANUAL.html#variables +# Change them as you see fit. +title: TDT4195 Exercise X +author: +- Gyrd Bannamule Gyrdsson +- Gjavleik Britonis Podebusk +date: \today # This is a latex command, ignored for HTML output +lang: en-US +papersize: a4 +geometry: margin=4cm +toc: false +toc-title: "Table of Contents" +toc-depth: 2 +numbersections: true +header-includes: +# The `atkinson` font, requires 'texlive-fontsextra' on arch or the 'atkinson' CTAN package +# Uncomment this line to enable: +#- '`\usepackage[sfdefault]{atkinson}`{=latex}' +colorlinks: true +links-as-notes: true +# The document is following this break is written using "Markdown" syntax +--- + + + +# Heading + +## Subheading + +### Subsubheading + +This is a paragraph. +This is the same paragraph. + +This is a new paragraph, with *italic*, **bold**, and `inline code` formatting. +It is possible to use special classes to format text: [this is a test]{.smallcaps}. + +```rust +//this is a code block with rust syntax highlighting +println!("Hello, {}", 42); +``` + +[This](https://www.ntnu.no) is a link. +[This][] is also a link. +This[^this_is_a_unique_footnote_label] is a footnote. +This^[Footnotes can also be written inline] is also a footnote. + + +[This]: https://www.uio.no +[^this_is_a_unique_footnote_label]: In footnotes you can write anything tangentially related. + +* This +* is +* a +* unordered +* list + +1. This +1. is +1. a +1. ordered +1. list + a. with + a. sub + a. list + + with multiple paragraphs + +This is still on the first page + +`\clearpage`{=latex} + + + +This is on the second page + +i) Roman ordered list +i) Roman ordered list +i) Roman ordered list + +This +: is a definition + +> this is a +block quote + + +This is a paragraph with _inline_ \LaTeX\ style math: $\frac{1}{2}$. +Below is a math _block_: + +$$ + \int_{a}^{b} f(x)dx +$$ + + +| This | is | a | table | +| ---- | --- | --- | ----- | +| 1 | 2 | 3 | 4 | +| 5 | 6 | 7 | 8 | + +: This is a table caption + +This is an inline image with a fixed height: +![](images/logo.png){height=5em} + +Below is a _figure_ (i.e. an image with a caption). +It floats and may as a result move to a different page depending on the layout. + +![ + Image with caption +](images/logo.png) + +Enable and use the `pandoc-crossref` filter to reference figures, tables and equations. diff --git a/gloom-rs/resources/.gitkeep b/gloom-rs/resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/gloom-rs/shaders/simple.frag b/gloom-rs/shaders/simple.frag new file mode 100644 index 0000000..38b19af --- /dev/null +++ b/gloom-rs/shaders/simple.frag @@ -0,0 +1,8 @@ +#version 410 core + +out vec4 color; + +void main() +{ + color = vec4(1.0f, 1.0f, 1.0f, 1.0f); +} \ No newline at end of file diff --git a/gloom-rs/shaders/simple.vert b/gloom-rs/shaders/simple.vert new file mode 100644 index 0000000..5bf2e12 --- /dev/null +++ b/gloom-rs/shaders/simple.vert @@ -0,0 +1,8 @@ +#version 410 core + +in vec3 position; + +void main() +{ + gl_Position = vec4(position, 1.0f); +} \ No newline at end of file diff --git a/gloom-rs/src/main.rs b/gloom-rs/src/main.rs new file mode 100644 index 0000000..593a979 --- /dev/null +++ b/gloom-rs/src/main.rs @@ -0,0 +1,355 @@ +// Uncomment these following global attributes to silence most warnings of "low" interest: +/* +#![allow(dead_code)] +#![allow(non_snake_case)] +#![allow(unreachable_code)] +#![allow(unused_mut)] +#![allow(unused_unsafe)] +#![allow(unused_variables)] +*/ +extern crate nalgebra_glm as glm; +use std::{ mem, ptr, os::raw::c_void }; +use std::thread; +use std::sync::{Mutex, Arc, RwLock}; + +mod shader; +mod util; + +use glutin::event::{Event, WindowEvent, DeviceEvent, KeyboardInput, ElementState::{Pressed, Released}, VirtualKeyCode::{self, *}}; +use glutin::event_loop::ControlFlow; + +// initial window size +const INITIAL_SCREEN_W: u32 = 800; +const INITIAL_SCREEN_H: u32 = 600; + +// == // Helper functions to make interacting with OpenGL a little bit prettier. You *WILL* need these! // == // + +// Get the size of an arbitrary array of numbers measured in bytes +// Example usage: byte_size_of_array(my_array) +fn byte_size_of_array(val: &[T]) -> isize { + std::mem::size_of_val(&val[..]) as isize +} + +// Get the OpenGL-compatible pointer to an arbitrary array of numbers +// Example usage: pointer_to_array(my_array) +fn pointer_to_array(val: &[T]) -> *const c_void { + &val[0] as *const T as *const c_void +} + +// Get the size of the given type in bytes +// Example usage: size_of::() +fn size_of() -> i32 { + mem::size_of::() as i32 +} + +// Get an offset in bytes for n units of type T, represented as a relative pointer +// Example usage: offset::(4) +fn offset(n: u32) -> *const c_void { + (n * mem::size_of::() as u32) as *const T as *const c_void +} + +// Get a null pointer (equivalent to an offset of 0) +// ptr::null() + + +// == // Generate your VAO here +unsafe fn create_vao(vertices: &Vec, indices: &Vec) -> u32 { + + let mut vao: u32 = 0; + gl::GenVertexArrays(1, &mut vao as *mut u32); + gl::BindVertexArray(vao); + + let mut vbo: u32 = 0; + gl::GenBuffers(1, &mut vbo as *mut u32); + gl::BindBuffer(gl::ARRAY_BUFFER, vbo); + + gl::BufferData(gl::ARRAY_BUFFER, byte_size_of_array(vertices), pointer_to_array(vertices), gl::STATIC_DRAW); + + gl::VertexAttribPointer( + 0, + 3, + gl::FLOAT, + gl::FALSE, + size_of::() * 3, + ptr::null() + ); + gl::EnableVertexAttribArray(0); + + let mut ibo = 0; + gl::GenBuffers(1, &mut ibo as *mut u32); + gl::BindBuffer(gl::ELEMENT_ARRAY_BUFFER, ibo); + + gl::BufferData(gl::ELEMENT_ARRAY_BUFFER, byte_size_of_array(indices), pointer_to_array(indices), gl::STATIC_DRAW); + + return vao; +} + + +fn main() { + // Set up the necessary objects to deal with windows and event handling + let el = glutin::event_loop::EventLoop::new(); + let wb = glutin::window::WindowBuilder::new() + .with_title("Gloom-rs") + .with_resizable(true) + .with_inner_size(glutin::dpi::LogicalSize::new(INITIAL_SCREEN_W, INITIAL_SCREEN_H)); + let cb = glutin::ContextBuilder::new() + .with_vsync(true); + let windowed_context = cb.build_windowed(wb, &el).unwrap(); + // Uncomment these if you want to use the mouse for controls, but want it to be confined to the screen and/or invisible. + // windowed_context.window().set_cursor_grab(true).expect("failed to grab cursor"); + // windowed_context.window().set_cursor_visible(false); + + // Set up a shared vector for keeping track of currently pressed keys + let arc_pressed_keys = Arc::new(Mutex::new(Vec::::with_capacity(10))); + // Make a reference of this vector to send to the render thread + let pressed_keys = Arc::clone(&arc_pressed_keys); + + // Set up shared tuple for tracking mouse movement between frames + let arc_mouse_delta = Arc::new(Mutex::new((0f32, 0f32))); + // Make a reference of this tuple to send to the render thread + let mouse_delta = Arc::clone(&arc_mouse_delta); + + // Set up shared tuple for tracking changes to the window size + let arc_window_size = Arc::new(Mutex::new((INITIAL_SCREEN_W, INITIAL_SCREEN_H, false))); + // Make a reference of this tuple to send to the render thread + let window_size = Arc::clone(&arc_window_size); + + // Spawn a separate thread for rendering, so event handling doesn't block rendering + let render_thread = thread::spawn(move || { + // Acquire the OpenGL Context and load the function pointers. + // This has to be done inside of the rendering thread, because + // an active OpenGL context cannot safely traverse a thread boundary + let context = unsafe { + let c = windowed_context.make_current().unwrap(); + gl::load_with(|symbol| c.get_proc_address(symbol) as *const _); + c + }; + + let mut window_aspect_ratio = INITIAL_SCREEN_W as f32 / INITIAL_SCREEN_H as f32; + + // Set up openGL + unsafe { + gl::Enable(gl::DEPTH_TEST); + gl::DepthFunc(gl::LESS); + gl::Enable(gl::CULL_FACE); + gl::Disable(gl::MULTISAMPLE); + gl::Enable(gl::BLEND); + gl::BlendFunc(gl::SRC_ALPHA, gl::ONE_MINUS_SRC_ALPHA); + gl::Enable(gl::DEBUG_OUTPUT_SYNCHRONOUS); + gl::DebugMessageCallback(Some(util::debug_callback), ptr::null()); + + // Print some diagnostics + println!("{}: {}", util::get_gl_string(gl::VENDOR), util::get_gl_string(gl::RENDERER)); + println!("OpenGL\t: {}", util::get_gl_string(gl::VERSION)); + println!("GLSL\t: {}", util::get_gl_string(gl::SHADING_LANGUAGE_VERSION)); + } + + // == // Set up your VAO around here + let verticiesVec: Vec = vec![ + // Triangle 1 + -0.9, -0.9, 0.0, + -0.7, -0.9, 0.0, + -0.8, -0.7, 0.0, + + // Triangle 2 + -0.6, -0.2, 0.0, + -0.2, -0.5, 0.0, + 0.4, 0.7, 0.0, + + // Triangle 3 + 0.5, 0.0, 0.0, + 0.0, -0.9, 0.0, + 0.6, -0.9, 0.0, + + // Triangle 4 + -0.4, 0.9, 0.0, + -0.9, 0.4, 0.0, + -0.2, 0.2, 0.0, + + // Triangle 5 + 0.9, -0.9, 0.0, + 0.9, 0.9, 0.0, + 0.5, 0.9, 0.0, + ]; + + let indexVec: Vec = vec![ + 0,1,2, + 3,4,5, + 6,7,8, + 9,10,11, + 12,13,14 + ]; + + let my_vao = unsafe {create_vao(&verticiesVec, &indexVec)}; + + + // == // Set up your shaders here + + // Basic usage of shader helper: + // The example code below creates a 'shader' object. + // It which contains the field `.program_id` and the method `.activate()`. + // The `.` in the path is relative to `Cargo.toml`. + // This snippet is not enough to do the exercise, and will need to be modified (outside + // of just using the correct path), but it only needs to be called once + + let simple_shader = unsafe { + shader::ShaderBuilder::new() + .attach_file("./shaders/simple.vert") + .attach_file("./shaders/simple.frag") + .link() + }; + + unsafe{ + gl::UseProgram(simple_shader.program_id); + } + + // Used to demonstrate keyboard handling for exercise 2. + let mut _arbitrary_number = 0.0; // feel free to remove + + + // The main rendering loop + let first_frame_time = std::time::Instant::now(); + let mut previous_frame_time = first_frame_time; + loop { + // Compute time passed since the previous frame and since the start of the program + let now = std::time::Instant::now(); + let elapsed = now.duration_since(first_frame_time).as_secs_f32(); + let delta_time = now.duration_since(previous_frame_time).as_secs_f32(); + previous_frame_time = now; + + // Handle resize events + if let Ok(mut new_size) = window_size.lock() { + if new_size.2 { + context.resize(glutin::dpi::PhysicalSize::new(new_size.0, new_size.1)); + window_aspect_ratio = new_size.0 as f32 / new_size.1 as f32; + (*new_size).2 = false; + println!("Window was resized to {}x{}", new_size.0, new_size.1); + unsafe { gl::Viewport(0, 0, new_size.0 as i32, new_size.1 as i32); } + } + } + + // Handle keyboard input + if let Ok(keys) = pressed_keys.lock() { + for key in keys.iter() { + match key { + // The `VirtualKeyCode` enum is defined here: + // https://docs.rs/winit/0.25.0/winit/event/enum.VirtualKeyCode.html + + VirtualKeyCode::A => { + _arbitrary_number += delta_time; + } + VirtualKeyCode::D => { + _arbitrary_number -= delta_time; + } + + + // default handler: + _ => { } + } + } + } + // Handle mouse movement. delta contains the x and y movement of the mouse since last frame in pixels + if let Ok(mut delta) = mouse_delta.lock() { + + // == // Optionally access the accumulated mouse movement between + // == // frames here with `delta.0` and `delta.1` + + *delta = (0.0, 0.0); // reset when done + } + + // == // Please compute camera transforms here (exercise 2 & 3) + + + unsafe { + // Clear the color and depth buffers + gl::ClearColor(0.035, 0.046, 0.078, 1.0); // night sky + gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT); + + + // == // Issue the necessary gl:: commands to draw your scene here + + gl::DrawElements(gl::TRIANGLES, indexVec.len() as i32, gl::UNSIGNED_INT, ptr::null()); + + } + + // Display the new color buffer on the display + context.swap_buffers().unwrap(); // we use "double buffering" to avoid artifacts + } + }); + + + // == // + // == // From here on down there are only internals. + // == // + + + // Keep track of the health of the rendering thread + let render_thread_healthy = Arc::new(RwLock::new(true)); + let render_thread_watchdog = Arc::clone(&render_thread_healthy); + thread::spawn(move || { + if !render_thread.join().is_ok() { + if let Ok(mut health) = render_thread_watchdog.write() { + println!("Render thread panicked!"); + *health = false; + } + } + }); + + // Start the event loop -- This is where window events are initially handled + el.run(move |event, _, control_flow| { + *control_flow = ControlFlow::Wait; + + // Terminate program if render thread panics + if let Ok(health) = render_thread_healthy.read() { + if *health == false { + *control_flow = ControlFlow::Exit; + } + } + + match event { + Event::WindowEvent { event: WindowEvent::Resized(physical_size), .. } => { + println!("New window size received: {}x{}", physical_size.width, physical_size.height); + if let Ok(mut new_size) = arc_window_size.lock() { + *new_size = (physical_size.width, physical_size.height, true); + } + } + Event::WindowEvent { event: WindowEvent::CloseRequested, .. } => { + *control_flow = ControlFlow::Exit; + } + // Keep track of currently pressed keys to send to the rendering thread + Event::WindowEvent { event: WindowEvent::KeyboardInput { + input: KeyboardInput { state: key_state, virtual_keycode: Some(keycode), .. }, .. }, .. } => { + + if let Ok(mut keys) = arc_pressed_keys.lock() { + match key_state { + Released => { + if keys.contains(&keycode) { + let i = keys.iter().position(|&k| k == keycode).unwrap(); + keys.remove(i); + } + }, + Pressed => { + if !keys.contains(&keycode) { + keys.push(keycode); + } + } + } + } + + // Handle Escape and Q keys separately + match keycode { + Escape => { *control_flow = ControlFlow::Exit; } + Q => { *control_flow = ControlFlow::Exit; } + _ => { } + } + } + Event::DeviceEvent { event: DeviceEvent::MouseMotion { delta }, .. } => { + // Accumulate mouse movement + if let Ok(mut position) = arc_mouse_delta.lock() { + *position = (position.0 + delta.0 as f32, position.1 + delta.1 as f32); + } + } + _ => { } + } + }); +} diff --git a/gloom-rs/src/shader.rs b/gloom-rs/src/shader.rs new file mode 100644 index 0000000..64895d9 --- /dev/null +++ b/gloom-rs/src/shader.rs @@ -0,0 +1,154 @@ +use gl; +use std::{ + ptr, + str, + ffi::CString, + path::Path, +}; + +pub struct Shader { + pub program_id: u32, +} + +pub struct ShaderBuilder { + program_id: u32, + shaders: Vec::, +} + +#[allow(dead_code)] +pub enum ShaderType { + Vertex, + Fragment, + TessellationControl, + TessellationEvaluation, + Geometry, +} + +impl Shader { + // Make sure the shader is active before calling this + pub unsafe fn get_uniform_location(&self, name: &str) -> i32 { + let name_cstr = CString::new(name).expect("CString::new failed"); + gl::GetUniformLocation(self.program_id, name_cstr.as_ptr()) + } + + pub unsafe fn activate(&self) { + gl::UseProgram(self.program_id); + } +} + +impl Into for ShaderType { + fn into(self) -> gl::types::GLenum { + match self { + ShaderType::Vertex => { gl::VERTEX_SHADER }, + ShaderType::Fragment => { gl::FRAGMENT_SHADER }, + ShaderType::TessellationControl => { gl::TESS_CONTROL_SHADER }, + ShaderType::TessellationEvaluation => { gl::TESS_EVALUATION_SHADER } , + ShaderType::Geometry => { gl::GEOMETRY_SHADER }, + } + } +} + +impl ShaderType { + fn from_ext(ext: &std::ffi::OsStr) -> Result { + match ext.to_str().expect("Failed to read extension") { + "vert" => { Ok(ShaderType::Vertex) }, + "frag" => { Ok(ShaderType::Fragment) }, + "tcs" => { Ok(ShaderType::TessellationControl) }, + "tes" => { Ok(ShaderType::TessellationEvaluation) }, + "geom" => { Ok(ShaderType::Geometry) }, + e => { Err(e.to_string()) }, + } + } +} + +impl ShaderBuilder { + pub unsafe fn new() -> ShaderBuilder { + ShaderBuilder { + program_id: gl::CreateProgram(), + shaders: vec![], + } + } + + pub unsafe fn attach_file(self, shader_path: &str) -> ShaderBuilder { + let path = Path::new(shader_path); + if let Some(extension) = path.extension() { + let shader_type = ShaderType::from_ext(extension) + .expect("Failed to parse file extension."); + let shader_src = std::fs::read_to_string(path) + .expect(&format!("Failed to read shader source. {}", shader_path)); + self.compile_shader(&shader_src, shader_type) + } else { + panic!("Failed to read extension of file with path: {}", shader_path); + } + } + + pub unsafe fn compile_shader(mut self, shader_src: &str, shader_type: ShaderType) -> ShaderBuilder { + let shader = gl::CreateShader(shader_type.into()); + let c_str_shader = CString::new(shader_src.as_bytes()).unwrap(); + gl::ShaderSource(shader, 1, &c_str_shader.as_ptr(), ptr::null()); + gl::CompileShader(shader); + + if !self.check_shader_errors(shader) { + panic!("Shader failed to compile."); + } + + self.shaders.push(shader); + + self + } + + unsafe fn check_shader_errors(&self, shader_id: u32) -> bool { + let mut success = i32::from(gl::FALSE); + let mut info_log = Vec::with_capacity(512); + info_log.set_len(512 - 1); + gl::GetShaderiv(shader_id, gl::COMPILE_STATUS, &mut success); + if success != i32::from(gl::TRUE) { + gl::GetShaderInfoLog( + shader_id, + 512, + ptr::null_mut(), + info_log.as_mut_ptr() as *mut gl::types::GLchar, + ); + println!("ERROR::Shader Compilation Failed!\n{}", String::from_utf8_lossy(&info_log)); + return false; + } + true + } + + unsafe fn check_linker_errors(&self) -> bool { + let mut success = i32::from(gl::FALSE); + let mut info_log = Vec::with_capacity(512); + info_log.set_len(512 - 1); + gl::GetProgramiv(self.program_id, gl::LINK_STATUS, &mut success); + if success != i32::from(gl::TRUE) { + gl::GetProgramInfoLog( + self.program_id, + 512, + ptr::null_mut(), + info_log.as_mut_ptr() as *mut gl::types::GLchar, + ); + println!("ERROR::SHADER::PROGRAM::COMPILATION_FAILED\n{}", String::from_utf8_lossy(&info_log)); + return false; + } + true + } + + #[must_use = "The shader program is useless if not stored in a variable."] + pub unsafe fn link(self) -> Shader { + for &shader in &self.shaders { + gl::AttachShader(self.program_id, shader); + } + gl::LinkProgram(self.program_id); + + // todo:: use this to make safer abstraction + self.check_linker_errors(); + + for &shader in &self.shaders { + gl::DeleteShader(shader); + } + + Shader { + program_id: self.program_id + } + } +} diff --git a/gloom-rs/src/util.rs b/gloom-rs/src/util.rs new file mode 100644 index 0000000..83938c1 --- /dev/null +++ b/gloom-rs/src/util.rs @@ -0,0 +1,32 @@ +use std::ffi::CString; +use libc; + +pub unsafe fn get_gl_string(name: gl::types::GLenum) -> String { + std::ffi::CStr::from_ptr(gl::GetString(name) as *mut libc::c_char).to_string_lossy().to_string() +} + +// Debug callback to panic upon encountering any OpenGL error +pub extern "system" fn debug_callback( + source: u32, e_type: u32, id: u32, + severity: u32, _length: i32, + msg: *const libc::c_char, _data: *mut std::ffi::c_void +) { + if e_type != gl::DEBUG_TYPE_ERROR { return } + if severity == gl::DEBUG_SEVERITY_HIGH || + severity == gl::DEBUG_SEVERITY_MEDIUM || + severity == gl::DEBUG_SEVERITY_LOW + { + let severity_string = match severity { + gl::DEBUG_SEVERITY_HIGH => "high", + gl::DEBUG_SEVERITY_MEDIUM => "medium", + gl::DEBUG_SEVERITY_LOW => "low", + _ => "unknown", + }; + unsafe { + let string = CString::from_raw(msg as *mut libc::c_char); + let error_message = String::from_utf8_lossy(string.as_bytes()).to_string(); + panic!("{}: Error of severity {} raised from {}: {}\n", + id, severity_string, source, error_message); + } + } +} diff --git a/gloom-rs/vendor/7za.exe b/gloom-rs/vendor/7za.exe new file mode 100644 index 0000000..2bdd57d Binary files /dev/null and b/gloom-rs/vendor/7za.exe differ