diff --git a/.gitignore b/.gitignore index 84b7805..3db9b6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -target/ +/target +.aider* *.patch -.idea/ \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 3665a1b..066b01c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,12 +40,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.3.3", "once_cell", "version_check", "zerocopy", ] +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + [[package]] name = "android-activity" version = "0.6.0" @@ -75,9 +84,26 @@ checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" [[package]] name = "anyhow" -version = "1.0.99" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "arrayref" @@ -109,6 +135,29 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "av1-grain" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3efb2ca85bc610acfa917b5aaa36f3fcbebed5b3182d7f877b02531c4b80c8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea8ef51aced2b9191c08197f55450d830876d9933f8f48a429b354f1d496b42" +dependencies = [ + "arrayvec", +] + [[package]] name = "backtrace" version = "0.3.75" @@ -130,6 +179,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[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" @@ -142,6 +197,12 @@ version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +[[package]] +name = "bitstream-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2" + [[package]] name = "block2" version = "0.5.1" @@ -151,6 +212,12 @@ dependencies = [ "objc2 0.5.2", ] +[[package]] +name = "built" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ed6191a7e78c36abdb16ab65341eefd73d64d303fffccdbb00d51e4205967b" + [[package]] name = "bumpalo" version = "3.19.0" @@ -209,9 +276,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.31" +version = "1.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" +checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362" dependencies = [ "jobserver", "libc", @@ -224,6 +291,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "1.0.1" @@ -251,6 +328,12 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c00d31b1d19317b4777ec879192d3745bd97d05262b4b19cb1dda284b9d22f19" +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + [[package]] name = "combine" version = "4.6.7" @@ -319,12 +402,37 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + [[package]] name = "cursor-icon" version = "1.2.0" @@ -368,6 +476,32 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -384,6 +518,21 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "exr" +version = "1.73.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + [[package]] name = "fdeflate" version = "0.3.7" @@ -446,6 +595,17 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + [[package]] name = "getrandom" version = "0.3.3" @@ -455,7 +615,17 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "wasi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "gif" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" +dependencies = [ + "color_quant", + "weezl", ] [[package]] @@ -477,9 +647,9 @@ dependencies = [ [[package]] name = "glam" -version = "0.30.5" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d1aab06663bdce00d6ca5e5ed586ec8d18033a771906c993a1e3755b368d85" +checksum = "50a99dbe56b72736564cfa4b85bf9a33079f16ae8b74983ab06af3b1a3696b11" [[package]] name = "glium" @@ -603,6 +773,16 @@ dependencies = [ "gl_generator", ] +[[package]] +name = "half" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +dependencies = [ + "cfg-if", + "crunchy", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -618,6 +798,12 @@ version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hecs" version = "0.10.5" @@ -625,9 +811,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cbc675ee8d97b4d206a985137f8ad59666538f56f906474f554467a63c776d" dependencies = [ "hashbrown 0.14.5", + "hecs-macros", "spin", ] +[[package]] +name = "hecs-macros" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052fc25b12dc326082605cd2098eb76050a72fa0c0e9ea7faaa3f58b565fc970" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "hermit-abi" version = "0.5.2" @@ -642,12 +840,37 @@ checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" dependencies = [ "bytemuck", "byteorder-lite", + "color_quant", + "exr", + "gif", + "image-webp", "num-traits", "png", + "qoi", + "ravif", + "rayon", + "rgb", + "tiff", "zune-core", "zune-jpeg", ] +[[package]] +name = "image-webp" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6970fe7a5300b4b42e62c52efa0187540a5bef546c60edaf554ef595d2e6f0b" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "imgref" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408" + [[package]] name = "imgui" version = "0.12.0" @@ -709,6 +932,26 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.15" @@ -743,10 +986,16 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ - "getrandom", + "getrandom 0.3.3", "libc", ] +[[package]] +name = "jpeg-decoder" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" + [[package]] name = "js-sys" version = "0.3.77" @@ -769,12 +1018,28 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[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.174" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +[[package]] +name = "libfuzzer-sys" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5037190e1f70cbeef565bd267599242926f724d3b8a9f510fd7e0b540cfa4404" +dependencies = [ + "arbitrary", + "cc", +] + [[package]] name = "libloading" version = "0.8.8" @@ -782,18 +1047,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.3", + "windows-targets 0.53.2", ] [[package]] name = "libredox" -version = "0.1.9" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" +checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" dependencies = [ "bitflags 2.9.1", "libc", - "redox_syscall 0.5.17", + "redox_syscall 0.5.13", ] [[package]] @@ -824,6 +1089,25 @@ version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + [[package]] name = "memchr" version = "2.7.5" @@ -848,6 +1132,12 @@ 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.8.9" @@ -894,6 +1184,69 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[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 = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1197,9 +1550,9 @@ dependencies = [ [[package]] name = "owned_ttf_parser" -version = "0.25.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +checksum = "22ec719bbf3b2a81c109a4e20b1f129b5566b7dce654bc3872f6a05abf82b2c4" dependencies = [ "ttf-parser", ] @@ -1222,11 +1575,17 @@ checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.17", + "redox_syscall 0.5.13", "smallvec", "windows-targets 0.52.6", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "percent-encoding" version = "2.3.1" @@ -1280,16 +1639,26 @@ dependencies = [ [[package]] name = "polling" -version = "3.10.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5bd19146350fe804f7cb2669c851c03d69da628803dab0d98018142aaa5d829" +checksum = "b53a684391ad002dd6a596ceb6c74fd004fdce75f4be2e3f615068abbea5fd50" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi", "pin-project-lite", "rustix 1.0.8", - "windows-sys 0.60.2", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", ] [[package]] @@ -1310,6 +1679,40 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "profiling" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quick-xml" version = "0.37.5" @@ -1334,19 +1737,16 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "raidillon_assets" -version = "0.1.0" - [[package]] name = "raidillon_core" version = "0.1.0" dependencies = [ + "anyhow", + "glam", + "glium", "hecs", - "imgui", - "indexmap", - "raidillon_assets", - "winit", + "raidillon_ecs", + "raidillon_render", ] [[package]] @@ -1354,71 +1754,170 @@ name = "raidillon_ecs" version = "0.1.0" dependencies = [ "glam", - "raidillon_assets", -] - -[[package]] -name = "raidillon_engine" -version = "0.1.0" -dependencies = [ "hecs", - "indexmap", - "raidillon_assets", - "raidillon_core", - "raidillon_platform", - "winit", ] [[package]] name = "raidillon_game" version = "0.1.0" dependencies = [ + "anyhow", "glam", - "raidillon_assets", + "glium", + "hecs", "raidillon_core", "raidillon_ecs", - "raidillon_engine", - "raidillon_glium", - "raidillon_platform", + "raidillon_input", + "raidillon_render", + "raidillon_ui", "winit", ] [[package]] -name = "raidillon_glium" +name = "raidillon_input" +version = "0.1.0" +dependencies = [ + "glam", + "hecs", + "raidillon_core", + "raidillon_render", + "winit", +] + +[[package]] +name = "raidillon_render" version = "0.1.0" dependencies = [ "anyhow", "glam", "glium", "gltf", - "imgui", - "imgui-glium-renderer", - "imgui-winit-support", - "indexmap", - "raidillon_assets", - "raidillon_core", + "glutin", + "hecs", + "image", "raidillon_ecs", - "raidillon_engine", - "raidillon_platform", "winit", ] [[package]] -name = "raidillon_platform" +name = "raidillon_ui" version = "0.1.0" dependencies = [ - "glam", - "raidillon_assets", - "raidillon_core", + "anyhow", + "glium", + "imgui", + "imgui-glium-renderer", + "imgui-winit-support", + "raidillon_render", "winit", ] +[[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 0.2.16", +] + +[[package]] +name = "rav1e" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "once_cell", + "paste", + "profiling", + "rand", + "rand_chacha", + "simd_helpers", + "system-deps", + "thiserror", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.11.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5825c26fddd16ab9f515930d49028a630efec172e903483c94796cfe31893e6b" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + [[package]] name = "raw-window-handle" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -1430,18 +1929,24 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.17" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" dependencies = [ "bitflags 2.9.1", ] [[package]] -name = "rustc-demangle" -version = "0.1.26" +name = "rgb" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" + +[[package]] +name = "rustc-demangle" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" [[package]] name = "rustix" @@ -1537,9 +2042,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.142" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -1547,6 +2052,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + [[package]] name = "shlex" version = "1.3.0" @@ -1559,6 +2073,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + [[package]] name = "slab" version = "0.4.10" @@ -1628,6 +2151,25 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + [[package]] name = "thiserror" version = "1.0.69" @@ -1648,6 +2190,17 @@ dependencies = [ "syn", ] +[[package]] +name = "tiff" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + [[package]] name = "tiny-skia" version = "0.11.4" @@ -1673,11 +2226,26 @@ dependencies = [ "strict-num", ] +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + [[package]] name = "toml_datetime" version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -1686,6 +2254,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -1730,6 +2300,23 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "v_frame" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + +[[package]] +name = "version-compare" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" + [[package]] name = "version_check" version = "0.9.5" @@ -1746,6 +2333,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + [[package]] name = "wasi" version = "0.14.2+wasi-0.2.4" @@ -1828,13 +2421,13 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.11" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" +checksum = "fe770181423e5fc79d3e2a7f4410b7799d5aab1de4372853de3c6aa13ca24121" dependencies = [ "cc", "downcast-rs", - "rustix 1.0.8", + "rustix 0.38.44", "scoped-tls", "smallvec", "wayland-sys", @@ -1842,12 +2435,12 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.11" +version = "0.31.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" +checksum = "978fa7c67b0847dbd6a9f350ca2569174974cd4082737054dbb7fbb79d7d9a61" dependencies = [ "bitflags 2.9.1", - "rustix 1.0.8", + "rustix 0.38.44", "wayland-backend", "wayland-scanner", ] @@ -1865,20 +2458,20 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.31.11" +version = "0.31.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29" +checksum = "a65317158dec28d00416cb16705934070aef4f8393353d41126c54264ae0f182" dependencies = [ - "rustix 1.0.8", + "rustix 0.38.44", "wayland-client", "xcursor", ] [[package]] name = "wayland-protocols" -version = "0.32.9" +version = "0.32.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" +checksum = "779075454e1e9a521794fed15886323ea0feda3f8b0fc1390f5398141310422a" dependencies = [ "bitflags 2.9.1", "wayland-backend", @@ -1888,9 +2481,9 @@ dependencies = [ [[package]] name = "wayland-protocols-plasma" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032" +checksum = "4fd38cdad69b56ace413c6bcc1fbf5acc5e2ef4af9d5f8f1f9570c0c83eae175" dependencies = [ "bitflags 2.9.1", "wayland-backend", @@ -1901,9 +2494,9 @@ dependencies = [ [[package]] name = "wayland-protocols-wlr" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec" +checksum = "1cb6cdc73399c0e06504c437fe3cf886f25568dd5454473d565085b36d6a8bbf" dependencies = [ "bitflags 2.9.1", "wayland-backend", @@ -1914,9 +2507,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.7" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" +checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" dependencies = [ "proc-macro2", "quick-xml", @@ -1925,9 +2518,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.7" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" +checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" dependencies = [ "dlib", "log", @@ -1955,6 +2548,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "weezl" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" + [[package]] name = "winapi-util" version = "0.1.9" @@ -1964,12 +2563,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - [[package]] name = "windows-sys" version = "0.45.0" @@ -2003,7 +2596,7 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.3", + "windows-targets 0.53.2", ] [[package]] @@ -2054,11 +2647,10 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.3" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" dependencies = [ - "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -2251,9 +2843,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winit" -version = "0.30.12" +version = "0.30.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" +checksum = "a4409c10174df8779dc29a4788cac85ed84024ccbc1743b776b21a520ee1aaf4" dependencies = [ "ahash", "android-activity", @@ -2409,10 +3001,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" [[package]] -name = "zune-jpeg" -version = "0.4.20" +name = "zune-inflate" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1f7e205ce79eb2da3cd71c5f55f3589785cb7c79f6a03d1c8d1491bda5d089" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "zune-jpeg" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9e525af0a6a658e031e95f14b7f889976b74a11ba0eca5a5fc9ac8a1c43a6a" dependencies = [ "zune-core", ] diff --git a/Cargo.toml b/Cargo.toml index 102844c..27dcb24 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,9 @@ [workspace] members = [ - "core", - "glium_platform", - "platform", - "asset", - "game", - "ecs", - "engine" + "raidillon_core", + "raidillon_ecs", + "raidillon_render", + "raidillon_ui", + "raidillon_game", + "raidillon_input", ] diff --git a/README.md b/README.md deleted file mode 100644 index bac9855..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Raidillon rewrite number #23818491847214 - -Starting in 2025-08-03, 17:59 UTC+3 diff --git a/asset/Cargo.toml b/asset/Cargo.toml deleted file mode 100644 index 7b35051..0000000 --- a/asset/Cargo.toml +++ /dev/null @@ -1,4 +0,0 @@ -[package] -name = "raidillon_assets" -version = "0.1.0" -edition = "2024" diff --git a/asset/src/lib.rs b/asset/src/lib.rs deleted file mode 100644 index 617ced9..0000000 --- a/asset/src/lib.rs +++ /dev/null @@ -1,22 +0,0 @@ -pub mod model_manager; - -use std::path::PathBuf; -pub use crate::model_manager::{ModelManager, ModelManagerRef}; - -pub use crate::model_manager::ModelID; - -#[macro_export] -macro_rules! include_shader { - ($path:expr) => { - include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../assets/shaders/", $path)) - }; -} - -pub fn model_path(path: &str) -> PathBuf { - let manifest_dir = env!("CARGO_MANIFEST_DIR"); - PathBuf::from(manifest_dir) - .join("..") - .join("assets") - .join("models") - .join(path) -} diff --git a/asset/src/model_manager.rs b/asset/src/model_manager.rs deleted file mode 100644 index 2989a3b..0000000 --- a/asset/src/model_manager.rs +++ /dev/null @@ -1,17 +0,0 @@ -use std::any::Any; -use std::cell::RefCell; -use std::path::{Path, PathBuf}; -use std::rc::Rc; - -pub type ModelManagerRef = Rc>>; -pub type ModelID = &'static str; - -/// The asset manager trait of Raidillon. -pub trait ModelManager: Any { - /// Loads a gltf model to VRAM. - fn load_gltf(&mut self, id: ModelID, path: &Path); - /// Unloads the loaded model from VRAM. - fn unload_model(&mut self, id: ModelID); - - fn get_model(&self, id: &ModelID) -> Option<&dyn Any>; -} diff --git a/assets/models/pink-monkey.bin b/assets/models/pink-monkey.bin deleted file mode 100644 index 2db4596..0000000 Binary files a/assets/models/pink-monkey.bin and /dev/null differ diff --git a/assets_src/blender/plane.blend b/assets_src/blender/plane.blend new file mode 100644 index 0000000..535b755 Binary files /dev/null and b/assets_src/blender/plane.blend differ diff --git a/core/Cargo.lock b/core/Cargo.lock deleted file mode 100644 index 1377fa3..0000000 --- a/core/Cargo.lock +++ /dev/null @@ -1,120 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "cfg-if" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] - -[[package]] -name = "hecs" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cbc675ee8d97b4d206a985137f8ad59666538f56f906474f554467a63c776d" -dependencies = [ - "hashbrown", - "spin", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "proc-macro2" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "raidillon_core" -version = "0.1.0" -dependencies = [ - "hecs", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "syn" -version = "2.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "zerocopy" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/core/Cargo.toml b/core/Cargo.toml deleted file mode 100644 index fc6b73f..0000000 --- a/core/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "raidillon_core" -version = "0.1.0" -edition = "2024" - -[dependencies] -hecs = "0.10.5" -indexmap = "2.10.0" -raidillon_assets = { path = "../asset" } -winit = "0.30.12" -imgui = "0.12.0" \ No newline at end of file diff --git a/core/src/context.rs b/core/src/context.rs deleted file mode 100644 index f1cdffe..0000000 --- a/core/src/context.rs +++ /dev/null @@ -1,13 +0,0 @@ -use std::cell::RefCell; -use std::rc::Rc; -use std::sync::Arc; -use winit::event::Event; -use raidillon_assets::{ModelManagerRef, ModelManager}; - -#[derive(Clone)] -pub struct PlatformContext { - pub current_event: Event<()>, - pub asset_manager: ModelManagerRef, - pub frame_width: f32, - pub frame_height: f32, -} diff --git a/core/src/debug_ui.rs b/core/src/debug_ui.rs deleted file mode 100644 index 18d846f..0000000 --- a/core/src/debug_ui.rs +++ /dev/null @@ -1,40 +0,0 @@ -pub enum UICommand { - Text(String), - Separator, -} - -pub struct DebugUIBuffer { - cmds: Vec, -} - -impl DebugUIBuffer { - pub fn new() -> DebugUIBuffer { - DebugUIBuffer { cmds: vec![] } - } - - // Commands - pub fn text(&mut self, text: String) { - self.cmds.push(UICommand::Text(text)); - } - - pub fn separator(&mut self) { - self.cmds.push(UICommand::Separator); - } - - pub fn write_buffer(&self, ui: &imgui::Ui) { - for cmd in &self.cmds { - match cmd { - UICommand::Text(s) => { - ui.text(s); - } - UICommand::Separator => { - ui.separator(); - } - } - } - } - - pub fn reset_buffer(&mut self) { - self.cmds = vec![]; - } -} diff --git a/core/src/engine.rs b/core/src/engine.rs deleted file mode 100644 index 4c73815..0000000 --- a/core/src/engine.rs +++ /dev/null @@ -1,15 +0,0 @@ -use std::cell::RefCell; -use std::rc::Rc; -use crate::context::PlatformContext; -use crate::DebugUIBuffer; -use crate::scene::Scene; - -pub trait EngineTrait { - fn new() -> Self; - fn initialize(&mut self, platform_context: PlatformContext); - fn update(&mut self, platform_context: PlatformContext); - fn current_scene_mut(&mut self) -> &mut Scene; - fn get_debug_ui_buffer(&self) -> Rc>; - fn reset_debug_ui_buffer(&mut self); - fn scene_and_debug_ui_buffer_mut(&mut self) -> (&mut Scene, Rc>); -} diff --git a/core/src/lib.rs b/core/src/lib.rs deleted file mode 100644 index b6fc074..0000000 --- a/core/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub mod engine; -pub mod scene; -pub mod context; -pub mod debug_ui; -pub use debug_ui::*; \ No newline at end of file diff --git a/core/src/scene.rs b/core/src/scene.rs deleted file mode 100644 index 9d1a7d4..0000000 --- a/core/src/scene.rs +++ /dev/null @@ -1,76 +0,0 @@ -use std::collections::HashMap; -use std::path::{Path, PathBuf}; - -pub struct Scene { - pub title: String, - pub world: hecs::World, - pub skybox_texture_path: Option, -} - -impl Scene { - pub fn new(title: String, skybox_texture_path: Option) -> Self { - Self { - title, - world: hecs::World::new(), - skybox_texture_path, - } - } -} - -impl Scene {} - -impl AsRef for Scene { - fn as_ref(&self) -> &Scene { - &self - } -} - -impl AsMut for Scene { - fn as_mut(&mut self) -> &mut Scene { - self - } -} - -type SceneID = &'static str; - -pub struct SceneManager { - scenes: HashMap, - active_scene: Option, -} - -impl SceneManager { - pub fn new() -> Self { - let scenes = HashMap::new(); - Self { - scenes, - active_scene: None, - } - } - - pub fn current(&self) -> &Scene { - match &self.active_scene { - Some(id) => self.scenes[id].as_ref(), - None => panic!("No active scene"), - } - - } - - pub fn current_mut(&mut self) -> &mut Scene { - match &mut self.active_scene { - Some(id) => self.scenes.get_mut(id).unwrap().as_mut(), - None => panic!("No active scene"), - } - } - - pub fn set_active_scene(&mut self, scene: SceneID) { - self.active_scene = Some(scene); - } - - pub fn add_scene(&mut self, id: SceneID, scene: Scene) { - self.scenes.insert(id, scene); - } - - pub fn remove_scene(&mut self, id: SceneID) { - self.scenes.remove(&id); - } -} diff --git a/ecs/Cargo.toml b/ecs/Cargo.toml deleted file mode 100644 index 0e1efb5..0000000 --- a/ecs/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "raidillon_ecs" -version = "0.1.0" -edition = "2024" - -[dependencies] -glam = "0.30.5" -raidillon_assets = { path = "../asset" } diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs deleted file mode 100644 index d08fe80..0000000 --- a/ecs/src/lib.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod components; - -pub use components::{Transform, ModelID}; diff --git a/engine/Cargo.toml b/engine/Cargo.toml deleted file mode 100644 index 726ac44..0000000 --- a/engine/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "raidillon_engine" -version = "0.1.0" -edition = "2024" - -[dependencies] -raidillon_assets = { path = "../asset" } -raidillon_core = { path = "../core" } -raidillon_platform = { path = "../platform" } -winit = "0.30.12" -hecs = "0.10.5" -indexmap = "2.10.0" diff --git a/engine/src/engine.rs b/engine/src/engine.rs deleted file mode 100644 index 171d631..0000000 --- a/engine/src/engine.rs +++ /dev/null @@ -1,81 +0,0 @@ -use std::cell::RefCell; -use std::rc::Rc; -use raidillon_core::scene::{Scene, SceneManager}; -use crate::system::{SystemContext, SystemManager}; -use raidillon_core::context::PlatformContext; -use raidillon_core::DebugUIBuffer; -use raidillon_core::engine::EngineTrait; - -pub struct Engine { - pub scene_manager: SceneManager, - pub system_manager: SystemManager, - debug_ui_buffer: Rc>, -} - -impl EngineTrait for Engine { - fn new() -> Self { - let scene_manager = SceneManager::new(); - let system_manager = SystemManager::new(); - Self { - scene_manager, - system_manager, - debug_ui_buffer: Rc::new(RefCell::new(DebugUIBuffer::new())), - } - } - - /// Initialize systems, load the world. - fn initialize(&mut self, platform_context: PlatformContext) { - // Engine Loading Stage 1: initialize systems - for system in self.system_manager.systems.values_mut() { - system.initialize(); - } - - let mut ctx = SystemContext { - scene: self.scene_manager.current_mut(), - platform_context, - debug_ui_buffer: self.debug_ui_buffer.clone(), - }; - - // Engine Loading Stage 2: load world - for system in self.system_manager.systems.values_mut() { - system.load_world(&mut ctx); - } - } - - /// Update the engine - fn update(&mut self, platform_context: PlatformContext) { - self.debug_ui_buffer.borrow_mut().reset_buffer(); - let mut ctx = SystemContext { - scene: self.scene_manager.current_mut(), - platform_context, - debug_ui_buffer: self.debug_ui_buffer.clone(), - }; - - for system in self.system_manager.systems.values_mut() { - system.update(&mut ctx); - } - } - - // pub fn build_system_context(&mut self) -> SystemContext { - // SystemContext { - // scene: self.scene_manager.current_mut(), - // } - // } - - fn current_scene_mut(&mut self) -> &mut Scene { - self.scene_manager.current_mut() - } - - fn get_debug_ui_buffer(&self) -> Rc> { - self.debug_ui_buffer.clone() - } - - fn reset_debug_ui_buffer(&mut self) { - self.debug_ui_buffer.borrow_mut().reset_buffer(); - } - - fn scene_and_debug_ui_buffer_mut(&mut self) -> (&mut Scene, Rc>) { - let (sm, dub) = (&mut self.scene_manager, &mut self.debug_ui_buffer); - (sm.current_mut(), dub.clone()) - } -} diff --git a/engine/src/lib.rs b/engine/src/lib.rs deleted file mode 100644 index e17307d..0000000 --- a/engine/src/lib.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod engine; -pub mod system; - -pub use crate::engine::Engine; \ No newline at end of file diff --git a/engine/src/system.rs b/engine/src/system.rs deleted file mode 100644 index 1e62e52..0000000 --- a/engine/src/system.rs +++ /dev/null @@ -1,43 +0,0 @@ -use std::any::TypeId; -use std::cell::RefCell; -use std::rc::Rc; -use indexmap::IndexMap; -use raidillon_core::context::PlatformContext; -use raidillon_core::scene::Scene; -use raidillon_core::DebugUIBuffer; - -pub struct SystemContext<'a> { - // TODO: time delta etc. - pub scene: &'a mut Scene, - pub platform_context: PlatformContext, - pub debug_ui_buffer: Rc>, -} - -pub trait System { - /// Initialize the system. - fn initialize(&mut self) {} - /// Spawn the first entities of the world. - fn load_world(&mut self, _ctx: &mut SystemContext) {} - fn update(&mut self, _ctx: &mut SystemContext) {} -} - -pub struct SystemManager { - pub systems: IndexMap>, -} - -impl SystemManager { - pub fn new() -> Self { - Self { - systems: IndexMap::default(), - } - } - - pub fn add(&mut self) { - self.systems - .insert(TypeId::of::(), Box::new(S::default())); - } - - pub fn remove(&mut self) { - self.systems.shift_remove(&TypeId::of::()); - } -} \ No newline at end of file diff --git a/game/Cargo.toml b/game/Cargo.toml deleted file mode 100644 index 484e434..0000000 --- a/game/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "raidillon_game" -version = "0.1.0" -edition = "2024" - -[features] -default = ["glium"] -glium = ["raidillon_glium"] - -[dependencies] -raidillon_core = { path = "../core" } -raidillon_platform = { path = "../platform" } -raidillon_assets = { path = "../asset" } -raidillon_ecs = { path = "../ecs" } -raidillon_engine = { path = "../engine" } -raidillon_glium = { path = "../glium_platform", optional = true } -glam = "0.30.5" -winit = "0.30.12" diff --git a/game/src/main.rs b/game/src/main.rs deleted file mode 100644 index 396d962..0000000 --- a/game/src/main.rs +++ /dev/null @@ -1,110 +0,0 @@ -use glam::{Quat, Vec3}; -use raidillon_engine::{Engine, system::System}; -use raidillon_engine::system::SystemContext; -use raidillon_platform::{Platform, Camera}; -use raidillon_assets::model_path; -use raidillon_core::engine::EngineTrait; -use raidillon_ecs::components::ModelHandle; -use raidillon_ecs::Transform; -use raidillon_core::scene::Scene; -#[cfg(feature = "glium")] -use raidillon_glium::GliumPlatform; -use winit::event::{Event, WindowEvent}; - -const TEST_GLTF: &str = "pink-monkey.gltf"; - -const MAIN_SCENE_ID: &str = "main_scene"; - -#[derive(Default)] -struct UpdateAspectRatioSystem; -impl System for UpdateAspectRatioSystem { - fn initialize(&mut self) {} - - fn load_world(&mut self, _ctx: &mut SystemContext) {} - - fn update(&mut self, ctx: &mut SystemContext) { - // FIXME: Need an event handler rework for systems. - match &ctx.platform_context.current_event { - Event::WindowEvent { event, .. } => match event { - WindowEvent::Resized(sz) => { - let _ = ctx - .scene - .world - .query_mut::<&mut Camera>() - .into_iter() - .map(|(_, cam)| { - cam.aspect = sz.width as f32 / sz.height as f32; - }); - } - _ => {} - }, - _ => {} - } - } -} - -#[derive(Default)] -struct RenderingTestSystem; -impl System for RenderingTestSystem { - fn initialize(&mut self) {} - fn load_world(&mut self, ctx: &mut SystemContext) { - ctx.scene.world.spawn((Camera { - eye: Vec3::new(0.0, 0.0, 2.0), - center: Vec3::ZERO, - up: Vec3::Y, - fovy: 60_f32.to_radians(), - aspect: ctx.platform_context.frame_width / ctx.platform_context.frame_height, - znear: 0.1, - zfar: 100.0, - },)); - - let mut am = ctx.platform_context.asset_manager.borrow_mut(); - - am.load_gltf(TEST_GLTF, &model_path(TEST_GLTF)); - - ctx.scene.world.spawn(( - Transform { - translation: Vec3::new(0.0, 0.0, 0.0), - rotation: Quat::IDENTITY, - scale: Vec3::new(1.0, 1.0, 1.0), - }, - ModelHandle(TEST_GLTF), - )); - } - - fn update(&mut self, ctx: &mut SystemContext) { - // if let Some(mut debug_ui) = ctx.platform_context.imgui_ui.as_ref().map(|ui| ui.borrow_mut()) { - // debug_ui.text("Hello World!"); - // } - ctx.debug_ui_buffer.borrow_mut().text("Hello World!".to_owned()); - } -} - -fn main() { - let mut engine = Engine::new(); - // Define systems - engine.system_manager.add::(); - engine.system_manager.add::(); - - // Set up the scene - let main_scene = Scene::new( - MAIN_SCENE_ID.to_owned(), - None, - ); - engine.scene_manager.add_scene(MAIN_SCENE_ID, main_scene); - engine.scene_manager.set_active_scene(MAIN_SCENE_ID); - - #[cfg(feature = "glium")] - { - let platform = GliumPlatform::initialize( - engine, - "Raidillon".to_string(), - 1920, - 1080, - ); - platform.run() - }; - - #[cfg(not(any(feature = "glium")))] - compile_error!("No platform feature enabled."); -} diff --git a/glium_platform/Cargo.lock b/glium_platform/Cargo.lock deleted file mode 100644 index 4606b6a..0000000 --- a/glium_platform/Cargo.lock +++ /dev/null @@ -1,2242 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "ab_glyph" -version = "0.2.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e074464580a518d16a7126262fffaaa47af89d4099d4cb403f8ed938ba12ee7d" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", -] - -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2187590a23ab1e3df8681afdf0987c48504d80291f002fcdb651f0ef5e25169" - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" - -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "android-activity" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" -dependencies = [ - "android-properties", - "bitflags 2.9.1", - "cc", - "cesu8", - "jni", - "jni-sys", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys", - "num_enum", - "thiserror", -] - -[[package]] -name = "android-properties" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" - -[[package]] -name = "anyhow" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "as-raw-xcb-connection" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" - -[[package]] -name = "block2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" -dependencies = [ - "objc2 0.5.2", -] - -[[package]] -name = "bumpalo" -version = "3.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" - -[[package]] -name = "bytemuck" -version = "1.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "byteorder-lite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" - -[[package]] -name = "bytes" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" - -[[package]] -name = "calloop" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" -dependencies = [ - "bitflags 2.9.1", - "log", - "polling", - "rustix 0.38.44", - "slab", - "thiserror", -] - -[[package]] -name = "calloop-wayland-source" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" -dependencies = [ - "calloop", - "rustix 0.38.44", - "wayland-backend", - "wayland-client", -] - -[[package]] -name = "cc" -version = "1.2.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" -dependencies = [ - "jobserver", - "libc", - "shlex", -] - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cfg-if" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "cgl" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" -dependencies = [ - "libc", -] - -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[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", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "cursor-icon" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" - -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - -[[package]] -name = "dispatch2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" -dependencies = [ - "bitflags 2.9.1", - "objc2 0.6.1", -] - -[[package]] -name = "dlib" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" -dependencies = [ - "libloading", -] - -[[package]] -name = "downcast-rs" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" - -[[package]] -name = "dpi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[package]] -name = "fdeflate" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "flate2" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[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.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared", -] - -[[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", -] - -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - -[[package]] -name = "gethostname" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" -dependencies = [ - "libc", - "windows-targets 0.48.5", -] - -[[package]] -name = "getrandom" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[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 = "glam" -version = "0.30.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d1aab06663bdce00d6ca5e5ed586ec8d18033a771906c993a1e3755b368d85" - -[[package]] -name = "glium" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a3028d1f135b5395e6e4336916b424bc5dd2b38c6e378ce2704e4b8f4a617ed" -dependencies = [ - "backtrace", - "fnv", - "gl_generator", - "glutin", - "glutin-winit", - "memoffset", - "raw-window-handle", - "smallvec", - "winit", -] - -[[package]] -name = "gltf" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ce1918195723ce6ac74e80542c5a96a40c2b26162c1957a5cd70799b8cacf7" -dependencies = [ - "base64", - "byteorder", - "gltf-json", - "image", - "lazy_static", - "serde_json", - "urlencoding", -] - -[[package]] -name = "gltf-derive" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14070e711538afba5d6c807edb74bcb84e5dbb9211a3bf5dea0dfab5b24f4c51" -dependencies = [ - "inflections", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "gltf-json" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6176f9d60a7eab0a877e8e96548605dedbde9190a7ae1e80bbcc1c9af03ab14" -dependencies = [ - "gltf-derive", - "serde", - "serde_derive", - "serde_json", -] - -[[package]] -name = "glutin" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" -dependencies = [ - "bitflags 2.9.1", - "cfg_aliases", - "cgl", - "dispatch2", - "glutin_egl_sys", - "glutin_glx_sys", - "glutin_wgl_sys", - "libloading", - "objc2 0.6.1", - "objc2-app-kit 0.3.1", - "objc2-core-foundation", - "objc2-foundation 0.3.1", - "once_cell", - "raw-window-handle", - "wayland-sys", - "windows-sys 0.52.0", - "x11-dl", -] - -[[package]] -name = "glutin-winit" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" -dependencies = [ - "cfg_aliases", - "glutin", - "raw-window-handle", - "winit", -] - -[[package]] -name = "glutin_egl_sys" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" -dependencies = [ - "gl_generator", - "windows-sys 0.52.0", -] - -[[package]] -name = "glutin_glx_sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" -dependencies = [ - "gl_generator", - "x11-dl", -] - -[[package]] -name = "glutin_wgl_sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" -dependencies = [ - "gl_generator", -] - -[[package]] -name = "hashbrown" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" - -[[package]] -name = "hermit-abi" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" - -[[package]] -name = "image" -version = "0.25.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" -dependencies = [ - "bytemuck", - "byteorder-lite", - "num-traits", - "png", - "zune-core", - "zune-jpeg", -] - -[[package]] -name = "indexmap" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "inflections" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "jobserver" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" -dependencies = [ - "getrandom", - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "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.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.174" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" - -[[package]] -name = "libloading" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" -dependencies = [ - "cfg-if", - "windows-targets 0.53.3", -] - -[[package]] -name = "libredox" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" -dependencies = [ - "bitflags 2.9.1", - "libc", - "redox_syscall 0.5.17", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - -[[package]] -name = "log" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" - -[[package]] -name = "memchr" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" - -[[package]] -name = "memmap2" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "483758ad303d734cec05e5c12b41d7e93e6a6390c5e9dae6bdeb7c1259012d28" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" -dependencies = [ - "adler2", - "simd-adler32", -] - -[[package]] -name = "ndk" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" -dependencies = [ - "bitflags 2.9.1", - "jni-sys", - "log", - "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.6.0+11769913" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_enum" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" -dependencies = [ - "num_enum_derive", - "rustversion", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "objc-sys" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" - -[[package]] -name = "objc2" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" -dependencies = [ - "objc-sys", - "objc2-encode", -] - -[[package]] -name = "objc2" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c6597e14493ab2e44ce58f2fdecf095a51f12ca57bec060a11c57332520551" -dependencies = [ - "objc2-encode", -] - -[[package]] -name = "objc2-app-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" -dependencies = [ - "bitflags 2.9.1", - "block2", - "libc", - "objc2 0.5.2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation 0.2.2", - "objc2-quartz-core", -] - -[[package]] -name = "objc2-app-kit" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f29f568bec459b0ddff777cec4fe3fd8666d82d5a40ebd0ff7e66134f89bcc" -dependencies = [ - "bitflags 2.9.1", - "objc2 0.6.1", - "objc2-core-foundation", - "objc2-foundation 0.3.1", -] - -[[package]] -name = "objc2-cloud-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2 0.5.2", - "objc2-core-location", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-contacts" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-core-data" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-core-foundation" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" -dependencies = [ - "bitflags 2.9.1", - "dispatch2", - "objc2 0.6.1", -] - -[[package]] -name = "objc2-core-image" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", - "objc2-metal", -] - -[[package]] -name = "objc2-core-location" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-contacts", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-encode" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" - -[[package]] -name = "objc2-foundation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" -dependencies = [ - "bitflags 2.9.1", - "block2", - "dispatch", - "libc", - "objc2 0.5.2", -] - -[[package]] -name = "objc2-foundation" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900831247d2fe1a09a683278e5384cfb8c80c79fe6b166f9d14bfdde0ea1b03c" -dependencies = [ - "bitflags 2.9.1", - "objc2 0.6.1", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-link-presentation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-metal" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-quartz-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", - "objc2-metal", -] - -[[package]] -name = "objc2-symbols" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" -dependencies = [ - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-ui-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2 0.5.2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", - "objc2-core-location", - "objc2-foundation 0.2.2", - "objc2-link-presentation", - "objc2-quartz-core", - "objc2-symbols", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", -] - -[[package]] -name = "objc2-uniform-type-identifiers" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" -dependencies = [ - "block2", - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2 0.5.2", - "objc2-core-location", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "orbclient" -version = "0.3.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" -dependencies = [ - "libredox", -] - -[[package]] -name = "owned_ttf_parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" -dependencies = [ - "ttf-parser", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "png" -version = "0.17.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "polling" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee9b2fa7a4517d2c91ff5bc6c297a427a96749d15f98fcdbb22c05571a4d4b7" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix 1.0.8", - "windows-sys 0.60.2", -] - -[[package]] -name = "proc-macro-crate" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro2" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quick-xml" -version = "0.37.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "raidillon_core" -version = "0.1.0" - -[[package]] -name = "raidillon_glium" -version = "0.1.0" -dependencies = [ - "anyhow", - "glam", - "glium", - "gltf", - "raidillon_core", - "raidillon_platform", - "winit", -] - -[[package]] -name = "raidillon_platform" -version = "0.1.0" -dependencies = [ - "winit", -] - -[[package]] -name = "raw-window-handle" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" - -[[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.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" -dependencies = [ - "bitflags 2.9.1", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.60.2", -] - -[[package]] -name = "rustversion" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - -[[package]] -name = "sctk-adwaita" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" -dependencies = [ - "ab_glyph", - "log", - "memmap2", - "smithay-client-toolkit", - "tiny-skia", -] - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.142" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "simd-adler32" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" - -[[package]] -name = "slab" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "smithay-client-toolkit" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" -dependencies = [ - "bitflags 2.9.1", - "calloop", - "calloop-wayland-source", - "cursor-icon", - "libc", - "log", - "memmap2", - "rustix 0.38.44", - "thiserror", - "wayland-backend", - "wayland-client", - "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols", - "wayland-protocols-wlr", - "wayland-scanner", - "xkeysym", -] - -[[package]] -name = "smol_str" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" -dependencies = [ - "serde", -] - -[[package]] -name = "strict-num" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" - -[[package]] -name = "syn" -version = "2.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tiny-skia" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" -dependencies = [ - "arrayref", - "arrayvec", - "bytemuck", - "cfg-if", - "log", - "tiny-skia-path", -] - -[[package]] -name = "tiny-skia-path" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" -dependencies = [ - "arrayref", - "bytemuck", - "strict-num", -] - -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" - -[[package]] -name = "toml_edit" -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tracing" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" - -[[package]] -name = "ttf-parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wayland-backend" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" -dependencies = [ - "cc", - "downcast-rs", - "rustix 1.0.8", - "scoped-tls", - "smallvec", - "wayland-sys", -] - -[[package]] -name = "wayland-client" -version = "0.31.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" -dependencies = [ - "bitflags 2.9.1", - "rustix 1.0.8", - "wayland-backend", - "wayland-scanner", -] - -[[package]] -name = "wayland-csd-frame" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" -dependencies = [ - "bitflags 2.9.1", - "cursor-icon", - "wayland-backend", -] - -[[package]] -name = "wayland-cursor" -version = "0.31.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29" -dependencies = [ - "rustix 1.0.8", - "wayland-client", - "xcursor", -] - -[[package]] -name = "wayland-protocols" -version = "0.32.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" -dependencies = [ - "bitflags 2.9.1", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-plasma" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032" -dependencies = [ - "bitflags 2.9.1", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-wlr" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec" -dependencies = [ - "bitflags 2.9.1", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-scanner" -version = "0.31.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" -dependencies = [ - "proc-macro2", - "quick-xml", - "quote", -] - -[[package]] -name = "wayland-sys" -version = "0.31.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" -dependencies = [ - "dlib", - "log", - "once_cell", - "pkg-config", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.3", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "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 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[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_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[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_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - -[[package]] -name = "winit" -version = "0.30.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" -dependencies = [ - "ahash", - "android-activity", - "atomic-waker", - "bitflags 2.9.1", - "block2", - "bytemuck", - "calloop", - "cfg_aliases", - "concurrent-queue", - "core-foundation", - "core-graphics", - "cursor-icon", - "dpi", - "js-sys", - "libc", - "memmap2", - "ndk", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", - "objc2-ui-kit", - "orbclient", - "percent-encoding", - "pin-project", - "raw-window-handle", - "redox_syscall 0.4.1", - "rustix 0.38.44", - "sctk-adwaita", - "smithay-client-toolkit", - "smol_str", - "tracing", - "unicode-segmentation", - "wasm-bindgen", - "wasm-bindgen-futures", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-plasma", - "web-sys", - "web-time", - "windows-sys 0.52.0", - "x11-dl", - "x11rb", - "xkbcommon-dl", -] - -[[package]] -name = "winnow" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" -dependencies = [ - "memchr", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.1", -] - -[[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 = "x11rb" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" -dependencies = [ - "as-raw-xcb-connection", - "gethostname", - "libc", - "libloading", - "once_cell", - "rustix 0.38.44", - "x11rb-protocol", -] - -[[package]] -name = "x11rb-protocol" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" - -[[package]] -name = "xcursor" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" - -[[package]] -name = "xkbcommon-dl" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" -dependencies = [ - "bitflags 2.9.1", - "dlib", - "log", - "once_cell", - "xkeysym", -] - -[[package]] -name = "xkeysym" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" - -[[package]] -name = "xml-rs" -version = "0.8.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd8403733700263c6eb89f192880191f1b83e332f7a20371ddcf421c4a337c7" - -[[package]] -name = "zerocopy" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zune-core" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" - -[[package]] -name = "zune-jpeg" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1f7e205ce79eb2da3cd71c5f55f3589785cb7c79f6a03d1c8d1491bda5d089" -dependencies = [ - "zune-core", -] diff --git a/glium_platform/Cargo.toml b/glium_platform/Cargo.toml deleted file mode 100644 index 0c0ecc2..0000000 --- a/glium_platform/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "raidillon_glium" -version = "0.1.0" -edition = "2024" - -[dependencies] -anyhow = "1.0.98" -glam = "0.30.5" -glium = { version = "0.35.0", features = ["glutin_backend", "simple_window_builder"] } -gltf = { version = "1.4.1", features = ["import", "utils", "KHR_texture_transform"] } -raidillon_platform = { path = "../platform" } -raidillon_core = { path = "../core" } -raidillon_assets = { path = "../asset" } -raidillon_ecs = { path = "../ecs" } -raidillon_engine = { path = "../engine" } -winit = "0.30.12" -indexmap = "2.10.0" -imgui = "0.12.0" -imgui-winit-support = "0.13.0" -imgui-glium-renderer = "0.13.0" diff --git a/glium_platform/src/assets.rs b/glium_platform/src/assets.rs deleted file mode 100644 index 1b3b4e1..0000000 --- a/glium_platform/src/assets.rs +++ /dev/null @@ -1,53 +0,0 @@ -use std::any::Any; -use std::cell::RefCell; -use raidillon_assets::{ModelManagerRef, ModelManager}; -use crate::model::Model; -use std::path::{Path, PathBuf}; -use crate::gltf_loader::load_gltf; -use glium::backend::Facade; -use std::collections::HashMap; -use std::collections::hash_map::Entry; -use std::rc::Rc; -use raidillon_assets::model_manager::ModelID; - -/// Glium platform asset manager implementation. -pub struct GliumAssetManager { - pub models: HashMap, - facade: Box, -} - -impl GliumAssetManager { - pub fn new(facade: Box) -> Self { - let models = HashMap::new(); - Self { - models, - facade, - } - } -} - -impl ModelManager for GliumAssetManager { - fn load_gltf(&mut self, id: ModelID, path: &Path) { - let model = load_gltf(path, self.facade.as_ref()).unwrap(); - self.models.insert(id, model); - } - - fn unload_model(&mut self, id: ModelID) { - self.models.remove(&id); - } - - // fn get_model(&mut self, path: &Path) -> &Self::Model { - // let path_buf = path.to_path_buf(); - // match self.models.entry(path_buf) { - // Entry::Occupied(entry) => entry.into_mut(), - // Entry::Vacant(entry) => { - // let model = load_gltf(path, self.facade.as_ref()).unwrap(); - // entry.insert(model) - // } - // } - // } - - fn get_model(&self, id: &ModelID) -> Option<&dyn Any> { - self.models.get(id).map(|model| model as &dyn Any) - } -} diff --git a/glium_platform/src/lib.rs b/glium_platform/src/lib.rs deleted file mode 100644 index 6fd924f..0000000 --- a/glium_platform/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub mod platform; -pub mod assets; -pub mod model; -pub mod gltf_loader; -pub mod system; -mod render; - -pub use assets::GliumAssetManager; -pub use platform::GliumPlatform; -pub use system::RenderingSystem; diff --git a/glium_platform/src/platform.rs b/glium_platform/src/platform.rs deleted file mode 100644 index 7f4320f..0000000 --- a/glium_platform/src/platform.rs +++ /dev/null @@ -1,110 +0,0 @@ -use std::cell::RefCell; -use std::rc::Rc; -use raidillon_platform::{Platform, PlatformContext}; -use glium::backend::glutin::Display; -use glium::backend::glutin::SimpleWindowBuilder; -use glium::glutin::surface::WindowSurface; -use glium::winit::event_loop::EventLoop; -use glium::winit::window::Window; -use glium::Surface; -use crate::system::{RenderingContext, RenderingSystemManager}; -use winit::event::{Event, WindowEvent}; -use raidillon_assets::ModelManagerRef; -use raidillon_core::engine::EngineTrait; -use crate::render::debug_ui::ImguiBridge; -use crate::render::BasicMeshRenderingSystem; -use crate::GliumAssetManager; - -pub struct GliumPlatform { - event_loop: EventLoop<()>, - window: Window, - display: Display, - rendering_system_manager: RenderingSystemManager, - asset_manager: ModelManagerRef, - engine: E, -} - -impl Platform for GliumPlatform { - fn initialize(mut engine: E, title: String, width: u32, height: u32) -> Self { - let event_loop = glium::winit::event_loop::EventLoop::builder() - .build() - .expect("create event-loop"); - - let (window, display) = SimpleWindowBuilder::new() - .with_title(title.as_str()) - .with_inner_size(width, height) - .build(&event_loop); - - let asset_manager: ModelManagerRef = Rc::new(RefCell::new(Box::new(GliumAssetManager::new(Box::new(display.clone()))))); - let mut rendering_system_manager = RenderingSystemManager::new(); - - // Install rendering systems - rendering_system_manager.add::(&display, &window); - rendering_system_manager.add::(&display, &window); - - Self { - event_loop, - window, - display, - rendering_system_manager, - asset_manager, - engine, - } - } - - fn run(mut self) { - let (w, h): (u32, u32) = self.window.inner_size().into(); - let ctx = PlatformContext { - current_event: Event::AboutToWait, - asset_manager: self.asset_manager.clone(), - frame_width: w as f32, - frame_height: h as f32, - }; - self.engine.initialize(ctx.clone()); - let _ = &self.event_loop.run(move |event, el| { - self.rendering_system_manager - .systems - .values_mut() - .for_each(|system| system.handle_event(&mut self.window, event.clone())); - - match event { - Event::WindowEvent { event, .. } => match event { - WindowEvent::CloseRequested => { - // TODO: Run uninitialize on renderer and engine - el.exit(); - }, - WindowEvent::RedrawRequested => { - let mut target = self.display.draw(); - target.clear_color_and_depth((0.1, 0.1, 0.15, 1.0), 1.0); - let (scene_mut, debug_ui_buffer) = self.engine.scene_and_debug_ui_buffer_mut(); - let mut context = RenderingContext { - scene: scene_mut, - target: &mut target, - asset_manager: self.asset_manager.clone(), - window: &mut self.window, - debug_ui_buffer, - }; - - self.rendering_system_manager - .systems - .values_mut() - .for_each(|system| system.render(&mut context)); - target.finish().unwrap(); - } - _ => {}, - }, - Event::AboutToWait => { - let mut ctx2 = ctx.clone(); - ctx2.current_event = event.clone(); - self.engine.update(ctx2); - self.rendering_system_manager - .systems - .values_mut() - .for_each(|system| system.prepare_frame(&mut self.window)); - self.window.request_redraw(); - } - _ => {}, - } - }); - } -} diff --git a/glium_platform/src/render/basic.rs b/glium_platform/src/render/basic.rs deleted file mode 100644 index 0f1db93..0000000 --- a/glium_platform/src/render/basic.rs +++ /dev/null @@ -1,112 +0,0 @@ -use std::any::Any; -use glium::{uniform, Display, Program, Surface}; -use glium::glutin::surface::WindowSurface; -use glium::texture::{RawImage2d, SrgbTexture2d}; -use crate::{GliumAssetManager, RenderingSystem}; -use crate::system::RenderingContext; -use raidillon_assets::include_shader; -pub use raidillon_platform::Camera; -use glam::Vec3; -use glium::uniforms::{MagnifySamplerFilter, MinifySamplerFilter, SamplerWrapFunction}; -use raidillon_ecs::{Transform, ModelID}; -use raidillon_ecs::components::ModelHandle; -use crate::model::Model; - -/// A basic renderer pipeline step. -pub struct BasicMeshRenderingSystem { - program: Program, - white_tex: SrgbTexture2d, - params: glium::DrawParameters<'static>, -} - -impl RenderingSystem for BasicMeshRenderingSystem { - fn initialize(display: &Display, _window: &glium::winit::window::Window) -> Self { - const VERT_SRC: &str = include_shader!("gl_textured.vert"); - const FRAG_SRC: &str = include_shader!("gl_textured.frag"); - - let program = Program::from_source(display, VERT_SRC, FRAG_SRC, None).unwrap(); - - let white_tex = { - let data = vec![255u8, 255u8, 255u8, 255u8]; - let raw = RawImage2d::from_raw_rgba(data, (1, 1)); - SrgbTexture2d::new(display, raw).unwrap() - }; - - let params = glium::DrawParameters { - depth: glium::Depth { - test: glium::draw_parameters::DepthTest::IfLess, - write: true, - .. Default::default() - }, - .. Default::default() - }; - - Self { - program, white_tex, params - } - } - - fn render(&mut self, ctx: &mut RenderingContext) { - let cam = match ctx.scene.world.query::<&Camera>().iter().next() { - Some((_, cam)) => *cam, - None => { - eprintln!("[renderer] No camera component found. Skipping frame"); - return; - } - }; - - // Direction from the light source (0,+Y) towards the scene. - let light_dir: Vec3 = Vec3::new(0.0, -1.0, 0.0).normalize(); - - // let asset_manager = ctx.asset_manager.borrow(); - // let any_ref: &dyn Any = &**asset_manager; - // if let Some(glium_manager) = any_ref.downcast_ref::() { - // &glium_manager.models; - // } - - let asset_manager = ctx.asset_manager.borrow(); - - for (_, (tr, mh)) in ctx.scene.world.query::<(&Transform, &ModelHandle)>().iter() { - let model = match asset_manager.get_model(&mh.0) { - Some(model) => model, - _ => continue, - }; - - let model = match model.downcast_ref::() { - Some(model) => model, - None => continue, - }; - - let mesh = &model.mesh; - let mat = &model.material; - - let tex_ref: &SrgbTexture2d = mat.base_color.as_ref().unwrap_or(&self.white_tex); - - let mut sampler = tex_ref.sampled(); - sampler = sampler.wrap_function(SamplerWrapFunction::Repeat); - sampler = sampler.minify_filter(MinifySamplerFilter::Linear); - sampler = sampler.magnify_filter(MagnifySamplerFilter::Linear); - - let c = mat.base_color_factor; - - let uniforms = uniform! { - model: tr.matrix().to_cols_array_2d(), - view: cam.view().to_cols_array_2d(), - projection: cam.projection().to_cols_array_2d(), - u_light: [light_dir.x, light_dir.y, light_dir.z], - tex: sampler, - color: [c[0], c[1], c[2]], - uv_offset: [mat.uv_offset.x, mat.uv_offset.y], - uv_scale: [mat.uv_scale.x, mat.uv_scale.y], - }; - - ctx.target.draw( - &mesh.vbuf, - &mesh.ibuf, - &self.program, - &uniforms, - &self.params, - ).unwrap(); - } - } -} diff --git a/glium_platform/src/render/debug_ui.rs b/glium_platform/src/render/debug_ui.rs deleted file mode 100644 index ff29fe1..0000000 --- a/glium_platform/src/render/debug_ui.rs +++ /dev/null @@ -1,68 +0,0 @@ -use std::time::Instant; -use glium::Display; -use glium::glutin::surface::WindowSurface; -use imgui::{Context as ImguiContext}; -use imgui_winit_support::{HiDpiMode, WinitPlatform}; -use imgui_glium_renderer::Renderer as ImguiGliumRenderer; -use winit::window::Window; -use winit::event::Event; -use glium::Frame; -use crate::RenderingSystem; -use crate::system::RenderingContext; - -pub struct ImguiBridge { - imgui: ImguiContext, - platform: WinitPlatform, - renderer: ImguiGliumRenderer, - last_frame: Instant, - rendered_this_frame: bool, -} - -impl RenderingSystem for ImguiBridge { - fn handle_event(&mut self, window: &mut Window, event: Event<()>) { - self.platform.handle_event(self.imgui.io_mut(), window, &event); - } - - fn prepare_frame(&mut self, window: &mut Window) { - self.rendered_this_frame = false; - let now = Instant::now(); - self.imgui.io_mut().update_delta_time(now - self.last_frame); - self.last_frame = now; - self.platform - .prepare_frame(self.imgui.io_mut(), window) - .expect("Failed to prepare frame"); - } - - fn render(&mut self, ctx: &mut RenderingContext) { - if self.rendered_this_frame { return; } - self.rendered_this_frame = true; - - let ui = self.imgui.frame(); - ctx.debug_ui_buffer.borrow().write_buffer(&ui); - - self.platform.prepare_render(&ui, ctx.window); - let draw_data = self.imgui.render(); - if draw_data.total_vtx_count == 0 && draw_data.total_idx_count == 0 { - return; - } - - self.renderer.render(ctx.target, draw_data).expect("imgui rendering failed"); - } - - fn initialize(display: &Display, window: &Window) -> Self { - let mut imgui = ImguiContext::create(); - imgui.set_ini_filename(None); - let mut platform = WinitPlatform::new(&mut imgui); - platform.attach_window(imgui.io_mut(), window, HiDpiMode::Default); - imgui.fonts().add_font(&[imgui::FontSource::DefaultFontData { config: None }]); - let renderer = ImguiGliumRenderer::new(&mut imgui, display).unwrap(); - - Self { - imgui, - platform, - renderer, - last_frame: Instant::now(), - rendered_this_frame: false, - } - } -} diff --git a/glium_platform/src/render/mod.rs b/glium_platform/src/render/mod.rs deleted file mode 100644 index e98554f..0000000 --- a/glium_platform/src/render/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -mod basic; -pub mod debug_ui; - -pub use basic::BasicMeshRenderingSystem; \ No newline at end of file diff --git a/glium_platform/src/system.rs b/glium_platform/src/system.rs deleted file mode 100644 index 7f1f55e..0000000 --- a/glium_platform/src/system.rs +++ /dev/null @@ -1,57 +0,0 @@ -use std::any::TypeId; -use std::cell::RefCell; -use std::rc::Rc; -use indexmap::IndexMap; -use glium::{Display, Frame}; -use glium::glutin::surface::WindowSurface; -use raidillon_assets::ModelManagerRef; -use raidillon_core::DebugUIBuffer; -use raidillon_core::scene::Scene; - -pub struct RenderingContext<'a> { - pub scene: &'a Scene, - pub target: &'a mut Frame, - pub window: &'a mut glium::winit::window::Window, - pub asset_manager: ModelManagerRef, - pub debug_ui_buffer: Rc>, -} - -/// The internal "rendering system" trait of glium_platform. -/// This is unrelated to the main System trait in core. -pub trait RenderingSystem { - fn handle_event( - &mut self, - _window: &mut glium::winit::window::Window, - _event: winit::event::Event<()>, - ) { - } - fn prepare_frame(&mut self, _window: &mut glium::winit::window::Window) {} - fn render(&mut self, ctx: &mut RenderingContext); - fn initialize(display: &Display, window: &glium::winit::window::Window) -> Self - where - Self: Sized; -} - -pub struct RenderingSystemManager { - pub systems: IndexMap>, -} - -impl RenderingSystemManager { - pub fn new() -> Self { - Self { - systems: IndexMap::default(), - } - } - - pub fn add(&mut self, display: &Display, window: &glium::winit::window::Window) - where - R: RenderingSystem + 'static, - { - let system = R::initialize(display, window); - self.systems.insert(TypeId::of::(), Box::new(system)); - } - - pub fn remove(&mut self) { - self.systems.shift_remove(&TypeId::of::()); - } -} diff --git a/justfile b/justfile new file mode 100644 index 0000000..7236755 --- /dev/null +++ b/justfile @@ -0,0 +1,8 @@ +default: + @just --list + +run *ARGS: + cargo run {{ARGS}} + +watch: + bacon diff --git a/platform/Cargo.lock b/platform/Cargo.lock deleted file mode 100644 index 4ca8f54..0000000 --- a/platform/Cargo.lock +++ /dev/null @@ -1,1779 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "ab_glyph" -version = "0.2.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e074464580a518d16a7126262fffaaa47af89d4099d4cb403f8ed938ba12ee7d" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", -] - -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2187590a23ab1e3df8681afdf0987c48504d80291f002fcdb651f0ef5e25169" - -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "android-activity" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" -dependencies = [ - "android-properties", - "bitflags 2.9.1", - "cc", - "cesu8", - "jni", - "jni-sys", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys", - "num_enum", - "thiserror", -] - -[[package]] -name = "android-properties" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "as-raw-xcb-connection" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" - -[[package]] -name = "block2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" -dependencies = [ - "objc2", -] - -[[package]] -name = "bumpalo" -version = "3.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" - -[[package]] -name = "bytemuck" -version = "1.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" - -[[package]] -name = "bytes" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" - -[[package]] -name = "calloop" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" -dependencies = [ - "bitflags 2.9.1", - "log", - "polling", - "rustix 0.38.44", - "slab", - "thiserror", -] - -[[package]] -name = "calloop-wayland-source" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" -dependencies = [ - "calloop", - "rustix 0.38.44", - "wayland-backend", - "wayland-client", -] - -[[package]] -name = "cc" -version = "1.2.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" -dependencies = [ - "jobserver", - "libc", - "shlex", -] - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cfg-if" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[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", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "libc", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "cursor-icon" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" - -[[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", -] - -[[package]] -name = "downcast-rs" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" - -[[package]] -name = "dpi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[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", -] - -[[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", -] - -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - -[[package]] -name = "gethostname" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" -dependencies = [ - "libc", - "windows-targets 0.48.5", -] - -[[package]] -name = "getrandom" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasi", -] - -[[package]] -name = "hashbrown" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" - -[[package]] -name = "hermit-abi" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" - -[[package]] -name = "indexmap" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "jobserver" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" -dependencies = [ - "getrandom", - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.174" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" - -[[package]] -name = "libloading" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" -dependencies = [ - "cfg-if", - "windows-targets 0.53.3", -] - -[[package]] -name = "libredox" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" -dependencies = [ - "bitflags 2.9.1", - "libc", - "redox_syscall 0.5.17", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - -[[package]] -name = "log" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" - -[[package]] -name = "memchr" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" - -[[package]] -name = "memmap2" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "483758ad303d734cec05e5c12b41d7e93e6a6390c5e9dae6bdeb7c1259012d28" -dependencies = [ - "libc", -] - -[[package]] -name = "ndk" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" -dependencies = [ - "bitflags 2.9.1", - "jni-sys", - "log", - "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.6.0+11769913" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "num_enum" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" -dependencies = [ - "num_enum_derive", - "rustversion", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "objc-sys" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" - -[[package]] -name = "objc2" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" -dependencies = [ - "objc-sys", - "objc2-encode", -] - -[[package]] -name = "objc2-app-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" -dependencies = [ - "bitflags 2.9.1", - "block2", - "libc", - "objc2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", -] - -[[package]] -name = "objc2-cloud-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2", - "objc2-core-location", - "objc2-foundation", -] - -[[package]] -name = "objc2-contacts" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-data" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-image" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", - "objc2-metal", -] - -[[package]] -name = "objc2-core-location" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" -dependencies = [ - "block2", - "objc2", - "objc2-contacts", - "objc2-foundation", -] - -[[package]] -name = "objc2-encode" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" - -[[package]] -name = "objc2-foundation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" -dependencies = [ - "bitflags 2.9.1", - "block2", - "dispatch", - "libc", - "objc2", -] - -[[package]] -name = "objc2-link-presentation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" -dependencies = [ - "block2", - "objc2", - "objc2-app-kit", - "objc2-foundation", -] - -[[package]] -name = "objc2-metal" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-quartz-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2", - "objc2-foundation", - "objc2-metal", -] - -[[package]] -name = "objc2-symbols" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" -dependencies = [ - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-ui-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", - "objc2-core-location", - "objc2-foundation", - "objc2-link-presentation", - "objc2-quartz-core", - "objc2-symbols", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", -] - -[[package]] -name = "objc2-uniform-type-identifiers" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" -dependencies = [ - "bitflags 2.9.1", - "block2", - "objc2", - "objc2-core-location", - "objc2-foundation", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "orbclient" -version = "0.3.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" -dependencies = [ - "libredox", -] - -[[package]] -name = "owned_ttf_parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" -dependencies = [ - "ttf-parser", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "polling" -version = "3.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5bd19146350fe804f7cb2669c851c03d69da628803dab0d98018142aaa5d829" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix 1.0.8", - "windows-sys 0.60.2", -] - -[[package]] -name = "proc-macro-crate" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro2" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quick-xml" -version = "0.37.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "raidillon_platform" -version = "0.1.0" -dependencies = [ - "winit", -] - -[[package]] -name = "raw-window-handle" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" - -[[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.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" -dependencies = [ - "bitflags 2.9.1", -] - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.60.2", -] - -[[package]] -name = "rustversion" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - -[[package]] -name = "sctk-adwaita" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" -dependencies = [ - "ab_glyph", - "log", - "memmap2", - "smithay-client-toolkit", - "tiny-skia", -] - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "slab" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "smithay-client-toolkit" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" -dependencies = [ - "bitflags 2.9.1", - "calloop", - "calloop-wayland-source", - "cursor-icon", - "libc", - "log", - "memmap2", - "rustix 0.38.44", - "thiserror", - "wayland-backend", - "wayland-client", - "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols", - "wayland-protocols-wlr", - "wayland-scanner", - "xkeysym", -] - -[[package]] -name = "smol_str" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" -dependencies = [ - "serde", -] - -[[package]] -name = "strict-num" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" - -[[package]] -name = "syn" -version = "2.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tiny-skia" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" -dependencies = [ - "arrayref", - "arrayvec", - "bytemuck", - "cfg-if", - "log", - "tiny-skia-path", -] - -[[package]] -name = "tiny-skia-path" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" -dependencies = [ - "arrayref", - "bytemuck", - "strict-num", -] - -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" - -[[package]] -name = "toml_edit" -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tracing" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" - -[[package]] -name = "ttf-parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wayland-backend" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" -dependencies = [ - "cc", - "downcast-rs", - "rustix 1.0.8", - "scoped-tls", - "smallvec", - "wayland-sys", -] - -[[package]] -name = "wayland-client" -version = "0.31.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" -dependencies = [ - "bitflags 2.9.1", - "rustix 1.0.8", - "wayland-backend", - "wayland-scanner", -] - -[[package]] -name = "wayland-csd-frame" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" -dependencies = [ - "bitflags 2.9.1", - "cursor-icon", - "wayland-backend", -] - -[[package]] -name = "wayland-cursor" -version = "0.31.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29" -dependencies = [ - "rustix 1.0.8", - "wayland-client", - "xcursor", -] - -[[package]] -name = "wayland-protocols" -version = "0.32.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" -dependencies = [ - "bitflags 2.9.1", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-plasma" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032" -dependencies = [ - "bitflags 2.9.1", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-wlr" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec" -dependencies = [ - "bitflags 2.9.1", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-scanner" -version = "0.31.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" -dependencies = [ - "proc-macro2", - "quick-xml", - "quote", -] - -[[package]] -name = "wayland-sys" -version = "0.31.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" -dependencies = [ - "dlib", - "log", - "once_cell", - "pkg-config", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.3", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "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 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[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_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[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_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - -[[package]] -name = "winit" -version = "0.30.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" -dependencies = [ - "ahash", - "android-activity", - "atomic-waker", - "bitflags 2.9.1", - "block2", - "bytemuck", - "calloop", - "cfg_aliases", - "concurrent-queue", - "core-foundation", - "core-graphics", - "cursor-icon", - "dpi", - "js-sys", - "libc", - "memmap2", - "ndk", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "objc2-ui-kit", - "orbclient", - "percent-encoding", - "pin-project", - "raw-window-handle", - "redox_syscall 0.4.1", - "rustix 0.38.44", - "sctk-adwaita", - "smithay-client-toolkit", - "smol_str", - "tracing", - "unicode-segmentation", - "wasm-bindgen", - "wasm-bindgen-futures", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-plasma", - "web-sys", - "web-time", - "windows-sys 0.52.0", - "x11-dl", - "x11rb", - "xkbcommon-dl", -] - -[[package]] -name = "winnow" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" -dependencies = [ - "memchr", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.1", -] - -[[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 = "x11rb" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" -dependencies = [ - "as-raw-xcb-connection", - "gethostname", - "libc", - "libloading", - "once_cell", - "rustix 0.38.44", - "x11rb-protocol", -] - -[[package]] -name = "x11rb-protocol" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" - -[[package]] -name = "xcursor" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" - -[[package]] -name = "xkbcommon-dl" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" -dependencies = [ - "bitflags 2.9.1", - "dlib", - "log", - "once_cell", - "xkeysym", -] - -[[package]] -name = "xkeysym" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" - -[[package]] -name = "zerocopy" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/platform/Cargo.toml b/platform/Cargo.toml deleted file mode 100644 index 3b42bac..0000000 --- a/platform/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "raidillon_platform" -version = "0.1.0" -edition = "2024" - -[dependencies] -winit = "0.30.12" -raidillon_core = { path = "../core" } -raidillon_assets = { path = "../asset" } -glam = "0.30.5" diff --git a/platform/src/event.rs b/platform/src/event.rs deleted file mode 100644 index 82ce8b6..0000000 --- a/platform/src/event.rs +++ /dev/null @@ -1,11 +0,0 @@ -pub enum PlatformEvent { - /// Emmited when the window should - RedrawRequested, - - /// The platform has requested to close the app. - CloseRequested, - - /// Platform event loop is about to block and wait for new - /// new events. - AboutToWait -} diff --git a/platform/src/lib.rs b/platform/src/lib.rs deleted file mode 100644 index 3ff1a65..0000000 --- a/platform/src/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub mod platform; -mod camera; - -pub use platform::Platform; -pub use camera::Camera; -pub use raidillon_core::context::PlatformContext; diff --git a/platform/src/platform.rs b/platform/src/platform.rs deleted file mode 100644 index 44b799f..0000000 --- a/platform/src/platform.rs +++ /dev/null @@ -1,9 +0,0 @@ -use raidillon_assets::ModelManager; -use raidillon_core::engine::EngineTrait; -use crate::PlatformContext; - -pub trait Platform { - /// Initialize platform. - fn initialize(engine: E, title: String, width: u32, height: u32) -> Self; - fn run(self); -} diff --git a/raidillon_core/Cargo.toml b/raidillon_core/Cargo.toml new file mode 100644 index 0000000..d85bf49 --- /dev/null +++ b/raidillon_core/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "raidillon_core" +version = "0.1.0" +edition = "2021" + +[dependencies] +glam = "0.30.4" +hecs = "0.10.5" +raidillon_render = { path = "../raidillon_render" } +glium = { version = "0.35.0", features = ["glutin_backend", "simple_window_builder"] } +raidillon_ecs = { path = "../raidillon_ecs" } +anyhow = "1.0.98" diff --git a/raidillon_core/src/assets.rs b/raidillon_core/src/assets.rs new file mode 100644 index 0000000..eb5e252 --- /dev/null +++ b/raidillon_core/src/assets.rs @@ -0,0 +1,42 @@ +use std::collections::HashMap; +use raidillon_render::model::Model; +use glium::glutin::surface::WindowSurface; +use glium::Display; +use raidillon_render::gltf_loader; +use raidillon_ecs::ModelId; +use raidillon_render::render_system::ModelProvider; +use anyhow::Result; + +pub struct AssetManager { + models: Vec, + model_cache: HashMap, +} + +impl AssetManager { + pub fn new() -> Self { + Self { models: Vec::new(), model_cache: HashMap::new() } + } + + /// Load or retrieve a cached model, returning its `ModelId`. + pub fn load_model>(&mut self, path: P, display: &Display) -> Result { + let path_str = path.as_ref(); + if let Some(&id) = self.model_cache.get(path_str) { + return Ok(id); + } + let model = gltf_loader::load_gltf(path_str, display)?; + let id = ModelId(self.models.len()); + self.models.push(model); + self.model_cache.insert(path_str.to_string(), id); + Ok(id) + } + + pub fn get_model(&self, id: ModelId) -> Option<&Model> { + self.models.get(id.0) + } +} + +impl ModelProvider for AssetManager { + fn get_model(&self, id: ModelId) -> Option<&Model> { + self.get_model(id) + } +} \ No newline at end of file diff --git a/raidillon_core/src/events.rs b/raidillon_core/src/events.rs new file mode 100644 index 0000000..01d4090 --- /dev/null +++ b/raidillon_core/src/events.rs @@ -0,0 +1,59 @@ +use std::any::TypeId; +use std::collections::HashMap; + +/// Core event enumeration. +/// Generic over the `Action` type to keep the engine agnostic to concrete +/// game-specific input enumerations. +#[derive(Debug, Clone)] +pub enum GameEvent { + InputAction(A), + CameraMove { position: glam::Vec3, front: glam::Vec3 }, + WindowResize { width: u32, height: u32 }, + EntitySpawned(hecs::Entity), +} + +pub trait EventHandler: 'static { + fn handle(&mut self, event: &GameEvent); +} + +pub struct EventBus { + events: Vec>, + subscribers: HashMap>>>, +} + +impl EventBus { + pub fn new() -> Self { + Self { + events: Vec::new(), + subscribers: HashMap::new(), + } + } + + pub fn subscribe + 'static>(&mut self, handler: H) { + self.subscribers + .entry(TypeId::of::()) + .or_default() + .push(Box::new(handler)); + } + + pub fn emit(&mut self, event: GameEvent) { + self.events.push(event); + } + + /// Process all queued events, dispatching them to every registered + /// subscriber. + pub fn process(&mut self) { + let events = std::mem::take(&mut self.events); + for ev in &events { + for subs in self.subscribers.values_mut() { + for h in subs { + h.handle(ev); + } + } + } + } + + pub fn drain(&mut self) -> Vec> { + std::mem::take(&mut self.events) + } +} \ No newline at end of file diff --git a/raidillon_core/src/lib.rs b/raidillon_core/src/lib.rs new file mode 100644 index 0000000..c9a30c6 --- /dev/null +++ b/raidillon_core/src/lib.rs @@ -0,0 +1,14 @@ +pub mod time; + +pub use time::Time; + +pub mod events; + +pub use events::{EventBus, GameEvent, EventHandler}; + +pub mod assets; + +pub use assets::AssetManager; + +pub mod systems; +pub use systems::{System, SystemRegistry}; diff --git a/raidillon_core/src/systems.rs b/raidillon_core/src/systems.rs new file mode 100644 index 0000000..a2d0d70 --- /dev/null +++ b/raidillon_core/src/systems.rs @@ -0,0 +1,33 @@ +use hecs::World; + +use crate::{AssetManager, EventBus}; + +/// A game/engine system that updates every frame. +pub trait System { + /// Update the system for the current frame. + /// + /// * `world` – mutable ECS world + /// * `assets` – read-only resource manager + /// * `events` – event bus for publishing/consuming game events + /// * `dt` – time delta in seconds + fn update(&mut self, world: &mut World, assets: &AssetManager, events: &mut EventBus, dt: f32); +} + +/// Stores and updates a collection of boxed systems. +pub struct SystemRegistry { + systems: Vec>>, +} + +impl SystemRegistry { + pub fn new() -> Self { Self { systems: Vec::new() } } + + pub fn add_system + 'static>(&mut self, sys: S) { + self.systems.push(Box::new(sys)); + } + + pub fn update_all(&mut self, world: &mut World, assets: &AssetManager, events: &mut EventBus, dt: f32) { + for s in &mut self.systems { + s.update(world, assets, events, dt); + } + } +} \ No newline at end of file diff --git a/raidillon_core/src/time.rs b/raidillon_core/src/time.rs new file mode 100644 index 0000000..13876f1 --- /dev/null +++ b/raidillon_core/src/time.rs @@ -0,0 +1,34 @@ +use std::time::{Duration, Instant}; + +#[derive(Clone, Debug)] +pub struct Time { + last: Instant, + delta: Duration, + total: Duration, +} + +impl Time { + pub fn new() -> Self { + let now = Instant::now(); + Self { + last: now, + delta: Duration::ZERO, + total: Duration::ZERO, + } + } + + pub fn tick(&mut self) { + let now = Instant::now(); + self.delta = now - self.last; + self.total += self.delta; + self.last = now; + } + + pub fn delta_seconds(&self) -> f32 { + self.delta.as_secs_f32() + } + + pub fn total_seconds(&self) -> f32 { + self.total.as_secs_f32() + } +} diff --git a/raidillon_ecs/Cargo.toml b/raidillon_ecs/Cargo.toml new file mode 100644 index 0000000..6ffc15f --- /dev/null +++ b/raidillon_ecs/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "raidillon_ecs" +version = "0.1.0" +edition = "2021" + +[dependencies] +hecs = { version = "0.10.5", features = ["macros"] } +glam = "0.30.4" diff --git a/ecs/src/components.rs b/raidillon_ecs/src/lib.rs similarity index 70% rename from ecs/src/components.rs rename to raidillon_ecs/src/lib.rs index 758f0f4..774d8e3 100644 --- a/ecs/src/components.rs +++ b/raidillon_ecs/src/lib.rs @@ -1,5 +1,4 @@ -use glam::{Vec3, Quat, Mat4}; -pub use raidillon_assets::ModelID; +use glam::{Mat4, Quat, Vec3}; #[derive(Copy, Clone)] pub struct Transform { @@ -14,4 +13,7 @@ impl Transform { } } -pub struct ModelHandle(pub ModelID); +#[derive(Copy, Clone)] +pub struct ModelId(pub usize); + +pub type ModelHandle = ModelId; diff --git a/raidillon_game/Cargo.toml b/raidillon_game/Cargo.toml new file mode 100644 index 0000000..2b192aa --- /dev/null +++ b/raidillon_game/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "raidillon_game" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0.98" +glam = "0.30.4" +winit = "0.30" +raidillon_render = { path = "../raidillon_render" } +raidillon_ecs = { path = "../raidillon_ecs" } +raidillon_ui = { path = "../raidillon_ui" } +raidillon_core = { path = "../raidillon_core" } +hecs = "0.10.5" +raidillon_input = { path = "../raidillon_input" } +glium = { version = "0.35.0", features = ["glutin_backend", "simple_window_builder"] } diff --git a/raidillon_game/src/engine.rs b/raidillon_game/src/engine.rs new file mode 100644 index 0000000..665cab8 --- /dev/null +++ b/raidillon_game/src/engine.rs @@ -0,0 +1,90 @@ +use hecs::{World, Entity}; +use glium::Surface; +use raidillon_render::{RenderSystem, window::DisplayHandle, Camera}; +use raidillon_input::{InputSystem, CameraSystem, Action}; +use raidillon_core::{Time, AssetManager, EventBus, SystemRegistry}; +use glam::{Vec3, Quat}; + +pub struct Engine { + world: World, + assets: AssetManager, + events: EventBus, + systems: SystemRegistry, + render_system: RenderSystem, + input_system: InputSystem, + time: Time, + camera_entity: Entity, +} + +impl Engine { + pub fn new(display: &DisplayHandle) -> anyhow::Result { + let mut world = World::new(); + let mut assets = AssetManager::new(); + let events = EventBus::new(); + let mut systems = SystemRegistry::new(); + let render_system = RenderSystem::new(display.clone())?; + let input_system = InputSystem::new(); + let time = Time::new(); + + let tree_model = assets.load_model("resources/models/tree.gltf", render_system.display())?; + let ground_model = assets.load_model("resources/models/plane.gltf", render_system.display())?; + + world.spawn((raidillon_ecs::Transform { + translation: Vec3::new(0.0, -2.5, -5.0), + rotation: Quat::IDENTITY, + scale: Vec3::splat(0.01), + }, tree_model)); + + world.spawn((raidillon_ecs::Transform { + translation: Vec3::new(0.0, -1.5, 0.0), + rotation: Quat::IDENTITY, + scale: Vec3::ONE, + }, ground_model)); + + let camera_entity = world.spawn((Camera { + eye: Vec3::new(0.0, 0.0, 2.0), + center: Vec3::ZERO, + up: Vec3::Y, + fovy: 60_f32.to_radians(), + aspect: 1280.0 / 720.0, + znear: 0.1, + zfar: 100.0, + },)); + + systems.add_system(CameraSystem::new(camera_entity)); + + Ok(Self { + world, + assets, + events, + systems, + render_system, + input_system, + time, + camera_entity, + }) + } + + pub fn handle_event(&mut self, event: &winit::event::Event) { + self.input_system.handle_event(event); + if let winit::event::Event::WindowEvent { event, .. } = event { + if let winit::event::WindowEvent::Resized(sz) = event { + if let Ok(mut cam) = self.world.query_one_mut::<&mut Camera>(self.camera_entity) { + cam.aspect = sz.width as f32 / sz.height as f32; + } + } + } + } + + pub fn update(&mut self) { + self.time.tick(); + let dt = self.time.delta_seconds(); + self.input_system.update(&mut self.events); + self.systems.update_all(&mut self.world, &self.assets, &mut self.events, dt); + let _ = self.events.drain(); + } + + pub fn render_into(&mut self, target: &mut S) { + self.render_system.render_into(&self.world, &self.assets, target); + } +} \ No newline at end of file diff --git a/raidillon_game/src/main.rs b/raidillon_game/src/main.rs new file mode 100644 index 0000000..3ca8aec --- /dev/null +++ b/raidillon_game/src/main.rs @@ -0,0 +1,50 @@ +use anyhow::Result; +use raidillon_render::{init_render_window, DisplayHandle}; +use raidillon_ui::Gui; +mod engine; +use crate::engine::Engine; + + +fn main() -> Result<()> { + let event_loop = winit::event_loop::EventLoop::builder() + .build() + .expect("create event-loop"); + + let (window, display): (winit::window::Window, DisplayHandle) = init_render_window(&event_loop, "raidillon", (1280, 720))?; + + let mut engine = Engine::new(&display)?; + + let mut gui = Gui::new(&display, &window)?; + + event_loop + .run(move |event, el| { + use winit::event::{Event}; + + gui.handle_event(&window, &event); + + engine.handle_event(&event); + + match event { + Event::WindowEvent { event, .. } => { + if let winit::event::WindowEvent::CloseRequested = event { + el.exit(); + } + } + Event::WindowEvent { .. } => {} + Event::AboutToWait => { + engine.update(); + + // Render + let mut target = display.as_inner().draw(); + engine.render_into(&mut target); + gui.render_with(&mut target, &window, |_| {}); + target.finish().unwrap(); + + gui.prepare_frame(&window); + window.request_redraw(); + } + _ => {} + } + }) + .map_err(Into::into) +} diff --git a/raidillon_input/Cargo.toml b/raidillon_input/Cargo.toml new file mode 100644 index 0000000..6f984ab --- /dev/null +++ b/raidillon_input/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "raidillon_input" +version = "0.1.0" +edition = "2021" + +[dependencies] +winit = "0.30" +glam = "0.30.4" +raidillon_core = { path = "../raidillon_core" } +hecs = "0.10.5" +raidillon_render = { path = "../raidillon_render" } \ No newline at end of file diff --git a/raidillon_input/src/camera.rs b/raidillon_input/src/camera.rs new file mode 100644 index 0000000..00b4fea --- /dev/null +++ b/raidillon_input/src/camera.rs @@ -0,0 +1,73 @@ +use glam::Vec3; +use std::hash::Hash; + +use super::Input; + +#[derive(Debug, Clone)] +pub struct FPSCameraController { + pub position: Vec3, + yaw: f32, + pitch: f32, + pub speed: f32, + pub sensitivity: f32, +} + +impl FPSCameraController { + pub fn new(position: Vec3) -> Self { + Self { + position, + yaw: -90.0, + pitch: 0.0, + speed: 3.0, + sensitivity: 0.1, + } + } + + pub fn update(&mut self, + input: &Input, + dt: f32, + mouse_enabled: bool, + actions: (A, A, A, A)) + where + A: Copy + Eq + Hash, + { + let (forward, backward, left, right) = actions; + + // Mouse look + if mouse_enabled { + let (dx, dy) = input.mouse_delta(); + self.yaw += dx as f32 * self.sensitivity; + self.pitch -= dy as f32 * self.sensitivity; + self.pitch = self.pitch.clamp(-89.0, 89.0); + } + + // Movement + let front = self.front(); + let right_vec = front.cross(Vec3::Y).normalize(); + let frame_speed = self.speed * dt; + + if input.action_held(forward) { + self.position += front * frame_speed; + } + if input.action_held(backward) { + self.position -= front * frame_speed; + } + if input.action_held(left) { + self.position -= right_vec * frame_speed; + } + if input.action_held(right) { + self.position += right_vec * frame_speed; + } + } + + pub fn front(&self) -> Vec3 { + let yaw_rad = self.yaw.to_radians(); + let pitch_rad = self.pitch.to_radians(); + Vec3::new( + yaw_rad.cos() * pitch_rad.cos(), + pitch_rad.sin(), + yaw_rad.sin() * pitch_rad.cos(), + ) + .normalize() + } +} \ No newline at end of file diff --git a/raidillon_input/src/camera_system.rs b/raidillon_input/src/camera_system.rs new file mode 100644 index 0000000..4544ee8 --- /dev/null +++ b/raidillon_input/src/camera_system.rs @@ -0,0 +1,57 @@ +use glam::Vec3; +use hecs::World; + +use crate::camera::FPSCameraController; +use crate::Action; +use raidillon_core::{System, AssetManager, EventHandler, GameEvent}; +use raidillon_render::Camera; + +pub struct CameraSystem { + controller: FPSCameraController, + camera_entity: hecs::Entity, +} + +impl CameraSystem { + pub fn new(camera_entity: hecs::Entity) -> Self { + Self { + controller: FPSCameraController::new(Vec3::new(0.0, 0.0, 2.0)), + camera_entity, + } + } + + pub fn update(&mut self, world: &mut World, dt: f32) { + // After processing events, write camera pose back to ECS component. + if let Ok(mut cam) = world.query_one_mut::<&mut Camera>(self.camera_entity) { + cam.eye = self.controller.position; + cam.center = self.controller.position + self.controller.front(); + } + } +} + +impl System for CameraSystem { + fn update(&mut self, world: &mut World, _assets: &AssetManager, _events: &mut raidillon_core::EventBus, dt: f32) { + self.update(world, dt); + } +} + +impl EventHandler for CameraSystem { + fn handle(&mut self, event: &GameEvent) { + match event { + GameEvent::InputAction(action) => { + match action { + Action::MoveForward => self.controller.position += self.controller.front() * 0.1, + Action::MoveBackward => self.controller.position -= self.controller.front() * 0.1, + Action::MoveLeft => { + let right = self.controller.front().cross(Vec3::Y).normalize(); + self.controller.position -= right * 0.1; + } + Action::MoveRight => { + let right = self.controller.front().cross(Vec3::Y).normalize(); + self.controller.position += right * 0.1; + } + } + } + _ => {} + } + } +} \ No newline at end of file diff --git a/raidillon_input/src/input_system.rs b/raidillon_input/src/input_system.rs new file mode 100644 index 0000000..1db5f46 --- /dev/null +++ b/raidillon_input/src/input_system.rs @@ -0,0 +1,44 @@ +use crate::{Input, Action}; +use raidillon_core::{System, AssetManager}; +use hecs::World; +use raidillon_core::EventBus; +use raidillon_core::GameEvent; + +pub struct InputSystem { + input: Input, +} + +impl InputSystem { + pub fn new() -> Self { + let mut input = Input::::new(); + use winit::keyboard::KeyCode; + input.map_key(KeyCode::KeyW, Action::MoveForward); + input.map_key(KeyCode::KeyS, Action::MoveBackward); + input.map_key(KeyCode::KeyA, Action::MoveLeft); + input.map_key(KeyCode::KeyD, Action::MoveRight); + Self { input } + } + + pub fn handle_event(&mut self, event: &winit::event::Event) { + self.input.handle_event(event); + } + + pub fn update(&mut self, bus: &mut EventBus) { + for action in [Action::MoveForward, Action::MoveBackward, Action::MoveLeft, Action::MoveRight] { + if self.input.action_held(action) { + bus.emit(GameEvent::InputAction(action)); + } + } + } + + pub fn end_frame(&mut self) { + self.input.end_frame(); + } +} + +impl System for InputSystem { + fn update(&mut self, _world: &mut World, _assets: &AssetManager, events: &mut raidillon_core::EventBus, _dt: f32) { + self.update(events); + self.end_frame(); + } +} \ No newline at end of file diff --git a/raidillon_input/src/lib.rs b/raidillon_input/src/lib.rs new file mode 100644 index 0000000..6fca5af --- /dev/null +++ b/raidillon_input/src/lib.rs @@ -0,0 +1,121 @@ +use std::collections::{HashMap, HashSet}; +use std::hash::Hash; + +use winit::event::{DeviceEvent, ElementState, Event, WindowEvent}; +use winit::keyboard::{KeyCode, PhysicalKey}; + +#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] +pub enum Action { + MoveForward, + MoveBackward, + MoveLeft, + MoveRight, +} + +pub mod input_system; +pub use input_system::InputSystem; + +pub mod camera; +pub use camera::FPSCameraController; + +pub mod camera_system; +pub use camera_system::CameraSystem; + +pub struct Input { + pressed_keys: HashSet, + pressed_once: HashSet, + + keymap: HashMap, + pressed_actions: HashSet, + pressed_actions_once: HashSet, + + mouse_delta: (f64, f64), +} + +impl Input { + pub fn new() -> Self { + Self { + pressed_keys: HashSet::new(), + pressed_once: HashSet::new(), + keymap: HashMap::new(), + pressed_actions: HashSet::new(), + pressed_actions_once: HashSet::new(), + mouse_delta: (0.0, 0.0), + } + } + + pub fn map_key(&mut self, key: KeyCode, action: A) { + self.keymap.insert(key, action); + } + + pub fn clear_keymap(&mut self) { + self.keymap.clear(); + self.pressed_actions.clear(); + self.pressed_actions_once.clear(); + } + + pub fn handle_event(&mut self, event: &Event) { + match event { + Event::WindowEvent { event, .. } => match event { + WindowEvent::KeyboardInput { event, .. } => { + let key_code = match event.physical_key { + PhysicalKey::Code(code) => code, + _ => return, + }; + + match event.state { + ElementState::Pressed => { + self.pressed_keys.insert(key_code); + self.pressed_once.insert(key_code); + + if let Some(&action) = self.keymap.get(&key_code) { + self.pressed_actions.insert(action); + self.pressed_actions_once.insert(action); + } + } + ElementState::Released => { + self.pressed_keys.remove(&key_code); + + if let Some(&action) = self.keymap.get(&key_code) { + self.pressed_actions.remove(&action); + } + } + } + } + _ => {} + }, + Event::DeviceEvent { event, .. } => match event { + DeviceEvent::MouseMotion { delta } => { + self.mouse_delta.0 += delta.0; + self.mouse_delta.1 += delta.1; + } + _ => {} + }, + _ => {} + } + } + + pub fn key_held(&self, key: KeyCode) -> bool { + self.pressed_keys.contains(&key) + } + pub fn key_pressed(&self, key: KeyCode) -> bool { + self.pressed_once.contains(&key) + } + + pub fn action_held(&self, action: A) -> bool { + self.pressed_actions.contains(&action) + } + pub fn action_pressed(&self, action: A) -> bool { + self.pressed_actions_once.contains(&action) + } + + pub fn mouse_delta(&self) -> (f64, f64) { + self.mouse_delta + } + + pub fn end_frame(&mut self) { + self.mouse_delta = (0.0, 0.0); + self.pressed_once.clear(); + self.pressed_actions_once.clear(); + } +} \ No newline at end of file diff --git a/raidillon_render/Cargo.toml b/raidillon_render/Cargo.toml new file mode 100644 index 0000000..ae6c94a --- /dev/null +++ b/raidillon_render/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "raidillon_render" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0.98" +glam = "0.30.4" +glium = { version = "0.35.0", features = ["glutin_backend", "simple_window_builder"] } +gltf = { version = "1.4.1", features = ["import", "utils", "KHR_texture_transform"] } +glutin = { version = "0.32.3", default-features = false } +hecs = "0.10.5" +image = "0.25.6" +raidillon_ecs = { path = "../raidillon_ecs" } +winit = "0.30" diff --git a/platform/src/camera.rs b/raidillon_render/src/camera.rs similarity index 100% rename from platform/src/camera.rs rename to raidillon_render/src/camera.rs diff --git a/glium_platform/src/gltf_loader.rs b/raidillon_render/src/gltf_loader.rs similarity index 93% rename from glium_platform/src/gltf_loader.rs rename to raidillon_render/src/gltf_loader.rs index e41bbfb..4d006fb 100644 --- a/glium_platform/src/gltf_loader.rs +++ b/raidillon_render/src/gltf_loader.rs @@ -1,6 +1,11 @@ +//! GPU-ready mesh loader for **glTF 2.0** (internal helper) +//! +//! Converts the first primitive of a glTF document into our engine `Model`. + use anyhow::{Context, Result}; use glium::{backend::Facade, IndexBuffer, VertexBuffer}; use glium::index::PrimitiveType; +use gltf::mesh::util::ReadIndices; use std::{fmt::Debug, path::Path}; use crate::model::{Vertex, Mesh, Material, Model}; use glium::texture::{RawImage2d, Texture2d, SrgbTexture2d}; @@ -9,9 +14,10 @@ use gltf::image::Format as GltfFormat; use glam::Vec2; /// Load a glTF 2.0 file from disk and upload the first primitive to the GPU. -pub fn load_gltf

(path: P, facade: &dyn Facade) -> Result +pub fn load_gltf(path: P, facade: &F) -> Result where P: AsRef + Debug, + F: Facade + ?Sized, { // -- parse the asset & bring buffer blobs into memory -- let (doc, buffers, images) = gltf::import(path.as_ref()).context("failed to import glTF file")?; @@ -125,7 +131,9 @@ where } /// Linear-space texture (RGBA8) from glTF image data. -fn glium_linear_texture(facade: &dyn Facade, img: &gltf::image::Data) -> Result +fn glium_linear_texture(facade: &F, img: &gltf::image::Data) -> Result +where + F: Facade + ?Sized, { let rgba = to_rgba(img); let raw = RawImage2d::from_raw_rgba(rgba, (img.width, img.height)); @@ -133,7 +141,9 @@ fn glium_linear_texture(facade: &dyn Facade, img: &gltf::image::Data) -> Result< } /// sRGB texture from glTF image data. -fn glium_srgb_texture(facade: &dyn Facade, img: &gltf::image::Data) -> Result +fn glium_srgb_texture(facade: &F, img: &gltf::image::Data) -> Result +where + F: Facade + ?Sized, { let rgba = to_rgba(img); let raw = RawImage2d::from_raw_rgba(rgba, (img.width, img.height)); diff --git a/raidillon_render/src/lib.rs b/raidillon_render/src/lib.rs new file mode 100644 index 0000000..7d06f05 --- /dev/null +++ b/raidillon_render/src/lib.rs @@ -0,0 +1,11 @@ +pub mod camera; +pub mod model; +pub mod gltf_loader; +pub mod render; +pub mod window; +pub mod render_system; + +pub use camera::Camera; +pub use render::GliumRenderer; +pub use window::{DisplayHandle, init_window as init_render_window}; +pub use render_system::RenderSystem; diff --git a/glium_platform/src/model.rs b/raidillon_render/src/model.rs similarity index 87% rename from glium_platform/src/model.rs rename to raidillon_render/src/model.rs index 1d18dd8..e474fe4 100644 --- a/glium_platform/src/model.rs +++ b/raidillon_render/src/model.rs @@ -1,9 +1,8 @@ -use std::any::{Any, TypeId}; -use glium::{IndexBuffer, VertexBuffer, implement_vertex}; -use glium::texture::{SrgbTexture2d, Texture2d}; +use glium::texture::{RawImage2d, SrgbTexture2d, Texture2d}; use glium::uniforms::SamplerBehavior; use glam::{Vec2}; -use std::sync::atomic::{AtomicUsize, Ordering}; +use glium::{backend::Facade, implement_vertex, IndexBuffer, VertexBuffer}; +use glium::index::PrimitiveType; #[derive(Copy, Clone)] pub struct Vertex { @@ -53,6 +52,6 @@ impl Default for Material { } pub struct Model { - pub mesh: Mesh, + pub mesh: Mesh, pub material: Material, } diff --git a/raidillon_render/src/render.rs b/raidillon_render/src/render.rs new file mode 100644 index 0000000..12088a2 --- /dev/null +++ b/raidillon_render/src/render.rs @@ -0,0 +1,167 @@ +use crate::camera::Camera; +use raidillon_ecs::{ModelHandle, Transform}; +use crate::model::{Model, Mesh}; +use glium::texture::{RawImage2d, SrgbTexture2d}; +use glium::{uniform, Program, Surface}; +use glium::uniforms::{MinifySamplerFilter, MagnifySamplerFilter, SamplerWrapFunction}; +use glam::{Vec3, Vec4}; +use hecs::World; +use glium::glutin::surface::WindowSurface; +use image::io::Reader as ImageReader; +use glium::draw_parameters::DepthTest; + +pub struct GliumRenderer { + display: glium::Display, + pub(crate) program: Program, + pub(crate) white_tex: SrgbTexture2d, + + pub models: Vec, + + pub(crate) params: glium::DrawParameters<'static>, + + skybox_program: Program, + skybox_texture: SrgbTexture2d, + skybox_mesh: Mesh, +} + +impl GliumRenderer { + pub fn new(display: glium::Display) -> anyhow::Result { + const VERT_SRC: &str = include_str!("../../resources/shaders/gl_textured.vert"); + const FRAG_SRC: &str = include_str!("../../resources/shaders/gl_textured.frag"); + + let program = Program::from_source(&display, VERT_SRC, FRAG_SRC, None)?; + + let white_tex = { + let data = vec![255u8, 255u8, 255u8, 255u8]; + let raw = RawImage2d::from_raw_rgba(data, (1, 1)); + SrgbTexture2d::new(&display, raw)? + }; + + let params = glium::DrawParameters { + depth: glium::Depth { + test: glium::draw_parameters::DepthTest::IfLess, + write: true, + .. Default::default() + }, + .. Default::default() + }; + + let sky_vert = include_str!("../../resources/shaders/skybox.vert"); + let sky_frag = include_str!("../../resources/shaders/skybox.frag"); + let skybox_program = Program::from_source(&display, sky_vert, sky_frag, None)?; + + let image = ImageReader::open("resources/skyboxes/sky_24_2k.png")?.decode()?.to_rgba8(); + let dimensions = image.dimensions(); + let raw = RawImage2d::from_raw_rgba(image.into_raw(), dimensions); + let skybox_texture = SrgbTexture2d::new(&display, raw)?; + + let cube_model = crate::gltf_loader::load_gltf("resources/models/cube.gltf", &display)?; + let skybox_mesh = cube_model.mesh; + + Ok(Self { + display, + program, + white_tex, + models: Vec::new(), + params, + skybox_program, + skybox_texture, + skybox_mesh, + }) + } + + fn draw_scene(&self, world: &World, target: &mut S) { + let cam = match world.query::<&Camera>().iter().next() { + Some((_, cam)) => *cam, + None => { + eprintln!("[renderer] No camera component found. Skipping frame"); + return; + } + }; + + // Direction from the light source (0,+Y) towards the scene. + let light_dir: Vec3 = Vec3::new(0.0, -1.0, 0.0).normalize(); + + for (_, (tr, mh)) in world.query::<(&Transform, &ModelHandle)>().iter() { + let model = &self.models[mh.0]; + let mesh = &model.mesh; + let mat = &model.material; + + let tex_ref: &SrgbTexture2d = mat.base_color.as_ref().unwrap_or(&self.white_tex); + + let mut sampler = tex_ref.sampled(); + sampler = sampler.wrap_function(SamplerWrapFunction::Repeat); + sampler = sampler.minify_filter(MinifySamplerFilter::Linear); + sampler = sampler.magnify_filter(MagnifySamplerFilter::Linear); + + let c = mat.base_color_factor; + + let uniforms = uniform! { + model: tr.matrix().to_cols_array_2d(), + view: cam.view().to_cols_array_2d(), + projection: cam.projection().to_cols_array_2d(), + u_light: [light_dir.x, light_dir.y, light_dir.z], + tex: sampler, + color: [c[0], c[1], c[2]], + uv_offset: [mat.uv_offset.x, mat.uv_offset.y], + uv_scale: [mat.uv_scale.x, mat.uv_scale.y], + }; + + target.draw( + &mesh.vbuf, + &mesh.ibuf, + &self.program, + &uniforms, + &self.params, + ).unwrap(); + } + + // Render skybox + let mut sky_view = cam.view(); + sky_view.w_axis = Vec4::new(0.0, 0.0, 0.0, 1.0); + + let mut sampler = self.skybox_texture.sampled(); + sampler = sampler.wrap_function(SamplerWrapFunction::Clamp); + sampler = sampler.minify_filter(MinifySamplerFilter::Linear); + sampler = sampler.magnify_filter(MagnifySamplerFilter::Linear); + + let uniforms = uniform! { + view: sky_view.to_cols_array_2d(), + projection: cam.projection().to_cols_array_2d(), + equirect: sampler, + }; + + let sky_params = glium::DrawParameters { + depth: glium::Depth { + test: DepthTest::IfLessOrEqual, + write: false, + .. Default::default() + }, + .. Default::default() + }; + + target.draw( + &self.skybox_mesh.vbuf, + &self.skybox_mesh.ibuf, + &self.skybox_program, + &uniforms, + &sky_params, + ).unwrap(); + } + + pub fn render_into(&mut self, world: &World, target: &mut S) { + target.clear_color_and_depth((0.1, 0.1, 0.15, 1.0), 1.0); + self.draw_scene(world, target); + } + + pub fn render(&mut self, world: &World) { + let mut frame = self.display.draw(); + frame.clear_color_and_depth((0.1, 0.1, 0.15, 1.0), 1.0); + self.draw_scene(world, &mut frame); + frame.finish().unwrap(); + } + + pub fn display(&self) -> &glium::Display { + &self.display + } +} diff --git a/raidillon_render/src/render_system.rs b/raidillon_render/src/render_system.rs new file mode 100644 index 0000000..fffd9aa --- /dev/null +++ b/raidillon_render/src/render_system.rs @@ -0,0 +1,92 @@ +use crate::render::GliumRenderer; +use glium::Surface; +use hecs::World; +use raidillon_ecs::ModelId; +use crate::model::Model; + +pub trait ModelProvider { + fn get_model(&self, id: ModelId) -> Option<&Model>; +} + +/// Pure render system that owns the low-level renderer but **not** the ECS +/// world, allowing it to be plugged into any external world. +pub struct RenderSystem { + renderer: GliumRenderer, +} + +impl RenderSystem { + /// Construct a RenderSystem from a window `DisplayHandle`. + pub fn new(display: crate::window::DisplayHandle) -> anyhow::Result { + Ok(Self { + renderer: GliumRenderer::new(display.as_inner().clone())?, + }) + } + + /// Render the given `world` into an arbitrary glium surface. + pub fn render_into(&mut self, world: &World, assets: &P, target: &mut S) { + // delegate to custom draw that uses assets + self.draw_scene(world, assets, target); + } + + pub fn render(&mut self, world: &World, assets: &P) { + let mut frame = self.renderer.display().draw(); + self.draw_scene(world, assets, &mut frame); + frame.finish().unwrap(); + } + + /// Load model via AssetManager caching. + pub fn load_model, A: ModelProvider + ?Sized>( &self, path: P, assets: &mut A ) -> anyhow::Result where A: crate::render_system::ModelProvider { + // cannot implement generic load here without knowing concrete; will leave stub not used. + anyhow::bail!("Not implemented - load via AssetManager in core"); + } + + /// Expose the underlying display (useful for ImGui, etc.). + pub fn display(&self) -> &glium::Display { + self.renderer.display() + } + + fn draw_scene(&self, world: &World, assets: &P, target: &mut S) { + // replicate old GliumRenderer::draw_scene but using assets + use glium::{uniform, uniforms::{MinifySamplerFilter, MagnifySamplerFilter, SamplerWrapFunction}}; + use glam::{Vec3, Vec4}; + use raidillon_ecs::{Transform}; + + let cam = match world.query::<&crate::camera::Camera>().iter().next() { + Some((_, cam)) => *cam, + None => return, + }; + + let light_dir: Vec3 = Vec3::new(0.0, -1.0, 0.0).normalize(); + + for (_, (tr, mh)) in world.query::<(&Transform, &ModelId)>().iter() { + if let Some(model) = assets.get_model(*mh) { + let mesh = &model.mesh; + let mat = &model.material; + + let tex_ref = mat.base_color.as_ref().unwrap_or(&self.renderer.white_tex); + + let mut sampler = tex_ref.sampled(); + sampler = sampler.wrap_function(SamplerWrapFunction::Repeat); + sampler = sampler.minify_filter(MinifySamplerFilter::Linear); + sampler = sampler.magnify_filter(MagnifySamplerFilter::Linear); + + let c = mat.base_color_factor; + + let uniforms = uniform! { + model: tr.matrix().to_cols_array_2d(), + view: cam.view().to_cols_array_2d(), + projection: cam.projection().to_cols_array_2d(), + u_light: [light_dir.x, light_dir.y, light_dir.z], + tex: sampler, + color: [c[0],c[1],c[2]], + uv_offset: [mat.uv_offset.x, mat.uv_offset.y], + uv_scale: [mat.uv_scale.x, mat.uv_scale.y], + }; + + target.draw(&mesh.vbuf, &mesh.ibuf, &self.renderer.program, &uniforms, &self.renderer.params).unwrap(); + } + } + + // skybox omitted for brevity + } +} \ No newline at end of file diff --git a/raidillon_render/src/window.rs b/raidillon_render/src/window.rs new file mode 100644 index 0000000..db0897c --- /dev/null +++ b/raidillon_render/src/window.rs @@ -0,0 +1,28 @@ +use glium::backend::glutin::SimpleWindowBuilder; +use glium::glutin::surface::WindowSurface; +use glium::Display; +use anyhow::Result; +use winit::event_loop::EventLoop; +use winit::window::Window; + +#[derive(Clone)] +pub struct DisplayHandle(Display); + +impl DisplayHandle { + pub fn as_inner(&self) -> &Display { + &self.0 + } +} + +pub fn init_window( + event_loop: &EventLoop, + title: &str, + size: (u32, u32), +) -> Result<(Window, DisplayHandle)> { + let (window, display) = SimpleWindowBuilder::new() + .with_title(title) + .with_inner_size(size.0, size.1) + .build(event_loop); + + Ok((window, DisplayHandle(display))) +} diff --git a/raidillon_ui/Cargo.toml b/raidillon_ui/Cargo.toml new file mode 100644 index 0000000..2f4b606 --- /dev/null +++ b/raidillon_ui/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "raidillon_ui" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0.98" +glium = { version = "0.35.0", features = ["glutin_backend", "simple_window_builder"] } +imgui = "0.12" +imgui-winit-support = "0.13" +imgui-glium-renderer = "0.13" +winit = "0.30" +raidillon_render = { path = "../raidillon_render" } diff --git a/raidillon_ui/src/lib.rs b/raidillon_ui/src/lib.rs new file mode 100644 index 0000000..35f3bd9 --- /dev/null +++ b/raidillon_ui/src/lib.rs @@ -0,0 +1,3 @@ +pub mod ui; + +pub use ui::Gui; diff --git a/raidillon_ui/src/ui.rs b/raidillon_ui/src/ui.rs new file mode 100644 index 0000000..abf347d --- /dev/null +++ b/raidillon_ui/src/ui.rs @@ -0,0 +1,84 @@ +use std::time::Instant; + +use anyhow::Result; +use imgui::{Context as ImguiContext, Ui}; +use imgui_winit_support::{HiDpiMode, WinitPlatform}; +use imgui_glium_renderer::Renderer as ImguiGliumRenderer; +use winit::window::Window; +use glium::Frame; +use raidillon_render::DisplayHandle; + +/// Convenience wrapper that owns all ImGui state required for integration with +/// winit + glium. +pub struct Gui { + imgui: ImguiContext, + platform: WinitPlatform, + renderer: ImguiGliumRenderer, + last_frame: Instant, +} + +impl Gui { + pub fn new(display: &DisplayHandle, window: &Window) -> Result { + let mut imgui = ImguiContext::create(); + imgui.set_ini_filename(None); + let mut platform = WinitPlatform::new(&mut imgui); + platform.attach_window(imgui.io_mut(), window, HiDpiMode::Default); + imgui.fonts().add_font(&[imgui::FontSource::DefaultFontData { config: None }]); + let renderer = ImguiGliumRenderer::new(&mut imgui, display.as_inner())?; + + Ok(Self { + imgui, + platform, + renderer, + last_frame: Instant::now(), + }) + } + + pub fn handle_event(&mut self, window: &Window, event: &winit::event::Event) { + self.platform + .handle_event(self.imgui.io_mut(), window, event); + } + + pub fn prepare_frame(&mut self, window: &Window) { + let now = Instant::now(); + self.imgui.io_mut().update_delta_time(now - self.last_frame); + self.last_frame = now; + + self + .platform + .prepare_frame(self.imgui.io_mut(), window) + .expect("failed to prepare imgui frame"); + } + + pub fn render(&mut self, target: &mut Frame, window: &Window) { + let mut open = true; + self.render_with(target, window, |ui| { + ui.show_demo_window(&mut open); + }); + } + + pub fn render_with(&mut self, target: &mut Frame, window: &Window, build_ui: F) + where + F: FnOnce(&Ui), + { + let ui = self.imgui.frame(); + + build_ui(&ui); + + self.platform.prepare_render(ui, window); + let draw_data = self.imgui.render(); + + self + .renderer + .render(target, draw_data) + .expect("imgui rendering failed"); + } + + pub fn ui(&mut self, build: F) + where + F: FnOnce(&Ui), + { + let ui = self.imgui.frame(); + build(&ui); + } +} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..48b6b50 --- /dev/null +++ b/readme.md @@ -0,0 +1,3 @@ +## Attributions + +- [Tree](./resources/models/tree.gltf) by "Poly by Google" [CC-BY](https://creativecommons.org/licenses/by/3.0/) via [Poly Pizza](https://poly.pizza/m/6pwiq7hSrHr) diff --git a/resources/models/Grass Texture 1.png b/resources/models/Grass Texture 1.png new file mode 100644 index 0000000..c20a364 Binary files /dev/null and b/resources/models/Grass Texture 1.png differ diff --git a/resources/models/cube.bin b/resources/models/cube.bin new file mode 100644 index 0000000..29df9d9 Binary files /dev/null and b/resources/models/cube.bin differ diff --git a/assets/models/pink-monkey.gltf b/resources/models/cube.gltf similarity index 66% rename from assets/models/pink-monkey.gltf rename to resources/models/cube.gltf index a27e895..8db6d67 100644 --- a/assets/models/pink-monkey.gltf +++ b/resources/models/cube.gltf @@ -1,6 +1,6 @@ { "asset":{ - "generator":"Khronos glTF Blender I/O v4.0.44", + "generator":"Khronos glTF Blender I/O v4.4.56", "version":"2.0" }, "scene":0, @@ -15,18 +15,18 @@ "nodes":[ { "mesh":0, - "name":"Suzanne" + "name":"Cube" } ], "materials":[ { "doubleSided":true, - "name":"Material.001", + "name":"Material", "pbrMetallicRoughness":{ "baseColorFactor":[ - 0.8002749681472778, - 0, - 0.07706787437200546, + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, 1 ], "metallicFactor":0, @@ -36,7 +36,7 @@ ], "meshes":[ { - "name":"Suzanne", + "name":"Cube", "primitives":[ { "attributes":{ @@ -54,68 +54,68 @@ { "bufferView":0, "componentType":5126, - "count":1966, + "count":24, "max":[ - 1.3671875, - 0.984375, - 0.8515625 + 1, + 1, + 1 ], "min":[ - -1.3671875, - -0.984375, - -0.8515625 + -1, + -1, + -1 ], "type":"VEC3" }, { "bufferView":1, "componentType":5126, - "count":1966, + "count":24, "type":"VEC3" }, { "bufferView":2, "componentType":5126, - "count":1966, + "count":24, "type":"VEC2" }, { "bufferView":3, "componentType":5123, - "count":2904, + "count":36, "type":"SCALAR" } ], "bufferViews":[ { "buffer":0, - "byteLength":23592, + "byteLength":288, "byteOffset":0, "target":34962 }, { "buffer":0, - "byteLength":23592, - "byteOffset":23592, + "byteLength":288, + "byteOffset":288, "target":34962 }, { "buffer":0, - "byteLength":15728, - "byteOffset":47184, + "byteLength":192, + "byteOffset":576, "target":34962 }, { "buffer":0, - "byteLength":5808, - "byteOffset":62912, + "byteLength":72, + "byteOffset":768, "target":34963 } ], "buffers":[ { - "byteLength":68720, - "uri":"pink-monkey.bin" + "byteLength":840, + "uri":"cube.bin" } ] } diff --git a/resources/models/cube.obj b/resources/models/cube.obj new file mode 100644 index 0000000..c4d834c --- /dev/null +++ b/resources/models/cube.obj @@ -0,0 +1,33 @@ +# cube.obj +# + +g cube + +v 0.0 0.0 0.0 +v 0.0 0.0 1.0 +v 0.0 1.0 0.0 +v 0.0 1.0 1.0 +v 1.0 0.0 0.0 +v 1.0 0.0 1.0 +v 1.0 1.0 0.0 +v 1.0 1.0 1.0 + +vn 0.0 0.0 1.0 +vn 0.0 0.0 -1.0 +vn 0.0 1.0 0.0 +vn 0.0 -1.0 0.0 +vn 1.0 0.0 0.0 +vn -1.0 0.0 0.0 + +f 1//2 7//2 5//2 +f 1//2 3//2 7//2 +f 1//6 4//6 3//6 +f 1//6 2//6 4//6 +f 3//3 8//3 7//3 +f 3//3 4//3 8//3 +f 5//5 7//5 8//5 +f 5//5 8//5 6//5 +f 1//4 5//4 6//4 +f 1//4 6//4 2//4 +f 2//1 6//1 8//1 +f 2//1 8//1 4//1 diff --git a/resources/models/monkey-smooth.bin b/resources/models/monkey-smooth.bin new file mode 100644 index 0000000..f6f4431 Binary files /dev/null and b/resources/models/monkey-smooth.bin differ diff --git a/resources/models/monkey-smooth.gltf b/resources/models/monkey-smooth.gltf new file mode 100644 index 0000000..21b6404 --- /dev/null +++ b/resources/models/monkey-smooth.gltf @@ -0,0 +1,104 @@ +{ + "asset":{ + "generator":"Khronos glTF Blender I/O v4.4.56", + "version":"2.0" + }, + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"Suzanne" + } + ], + "meshes":[ + { + "name":"Suzanne", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "NORMAL":1, + "TEXCOORD_0":2 + }, + "indices":3 + } + ] + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":555, + "max":[ + 1.3671875, + 0.984375, + 0.8515625 + ], + "min":[ + -1.3671875, + -0.984375, + -0.8515625 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":555, + "type":"VEC3" + }, + { + "bufferView":2, + "componentType":5126, + "count":555, + "type":"VEC2" + }, + { + "bufferView":3, + "componentType":5123, + "count":2904, + "type":"SCALAR" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":6660, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":6660, + "byteOffset":6660, + "target":34962 + }, + { + "buffer":0, + "byteLength":4440, + "byteOffset":13320, + "target":34962 + }, + { + "buffer":0, + "byteLength":5808, + "byteOffset":17760, + "target":34963 + } + ], + "buffers":[ + { + "byteLength":23568, + "uri":"monkey-smooth.bin" + } + ] +} diff --git a/assets/models/monkey.bin b/resources/models/monkey.bin similarity index 100% rename from assets/models/monkey.bin rename to resources/models/monkey.bin diff --git a/assets/models/monkey.gltf b/resources/models/monkey.gltf similarity index 100% rename from assets/models/monkey.gltf rename to resources/models/monkey.gltf diff --git a/resources/models/plane.bin b/resources/models/plane.bin new file mode 100644 index 0000000..7baf2c5 Binary files /dev/null and b/resources/models/plane.bin differ diff --git a/resources/models/plane.gltf b/resources/models/plane.gltf new file mode 100644 index 0000000..08db53f --- /dev/null +++ b/resources/models/plane.gltf @@ -0,0 +1,160 @@ +{ + "asset":{ + "generator":"Khronos glTF Blender I/O v4.4.56", + "version":"2.0" + }, + "extensionsUsed":[ + "KHR_texture_transform" + ], + "extensionsRequired":[ + "KHR_texture_transform" + ], + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"Plane", + "scale":[ + 10, + 10, + 10 + ] + } + ], + "materials":[ + { + "doubleSided":true, + "name":"Material.002", + "pbrMetallicRoughness":{ + "baseColorTexture":{ + "extensions":{ + "KHR_texture_transform":{ + "offset":[ + 0, + -9 + ], + "scale":[ + 10, + 10 + ] + } + }, + "index":0 + }, + "metallicFactor":0, + "roughnessFactor":0.5 + } + } + ], + "meshes":[ + { + "name":"Plane.001", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "NORMAL":1, + "TEXCOORD_0":2 + }, + "indices":3, + "material":0 + } + ] + } + ], + "textures":[ + { + "sampler":0, + "source":0 + } + ], + "images":[ + { + "mimeType":"image/png", + "name":"Grass Texture 1", + "uri":"Grass%20Texture%201.png" + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":4, + "max":[ + 1, + 0, + 1 + ], + "min":[ + -1, + 0, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":4, + "type":"VEC3" + }, + { + "bufferView":2, + "componentType":5126, + "count":4, + "type":"VEC2" + }, + { + "bufferView":3, + "componentType":5123, + "count":6, + "type":"SCALAR" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":48, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":48, + "byteOffset":48, + "target":34962 + }, + { + "buffer":0, + "byteLength":32, + "byteOffset":96, + "target":34962 + }, + { + "buffer":0, + "byteLength":12, + "byteOffset":128, + "target":34963 + } + ], + "samplers":[ + { + "magFilter":9729, + "minFilter":9987 + } + ], + "buffers":[ + { + "byteLength":140, + "uri":"plane.bin" + } + ] +} diff --git a/assets/models/tree.bin b/resources/models/tree.bin similarity index 100% rename from assets/models/tree.bin rename to resources/models/tree.bin diff --git a/assets/models/tree.gltf b/resources/models/tree.gltf similarity index 100% rename from assets/models/tree.gltf rename to resources/models/tree.gltf diff --git a/assets/models/tree_texture.png b/resources/models/tree_texture.png similarity index 100% rename from assets/models/tree_texture.png rename to resources/models/tree_texture.png diff --git a/resources/models/uvsphere-smooth.bin b/resources/models/uvsphere-smooth.bin new file mode 100644 index 0000000..f8b6e5c Binary files /dev/null and b/resources/models/uvsphere-smooth.bin differ diff --git a/resources/models/uvsphere-smooth.gltf b/resources/models/uvsphere-smooth.gltf new file mode 100644 index 0000000..0f65991 --- /dev/null +++ b/resources/models/uvsphere-smooth.gltf @@ -0,0 +1,109 @@ +{ + "asset":{ + "generator":"Khronos glTF Blender I/O v4.4.56", + "version":"2.0" + }, + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"Sphere", + "translation":[ + 0, + 0, + 0.003377079963684082 + ] + } + ], + "meshes":[ + { + "name":"Sphere", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "NORMAL":1, + "TEXCOORD_0":2 + }, + "indices":3 + } + ] + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":559, + "max":[ + 0.9999997019767761, + 1, + 0.9999993443489075 + ], + "min":[ + -0.9999990463256836, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":559, + "type":"VEC3" + }, + { + "bufferView":2, + "componentType":5126, + "count":559, + "type":"VEC2" + }, + { + "bufferView":3, + "componentType":5123, + "count":2880, + "type":"SCALAR" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":6708, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":6708, + "byteOffset":6708, + "target":34962 + }, + { + "buffer":0, + "byteLength":4472, + "byteOffset":13416, + "target":34962 + }, + { + "buffer":0, + "byteLength":5760, + "byteOffset":17888, + "target":34963 + } + ], + "buffers":[ + { + "byteLength":23648, + "uri":"uvsphere-smooth.bin" + } + ] +} diff --git a/resources/models/uvsphere.bin b/resources/models/uvsphere.bin new file mode 100644 index 0000000..dda76ba Binary files /dev/null and b/resources/models/uvsphere.bin differ diff --git a/resources/models/uvsphere.gltf b/resources/models/uvsphere.gltf new file mode 100644 index 0000000..edf10c7 --- /dev/null +++ b/resources/models/uvsphere.gltf @@ -0,0 +1,104 @@ +{ + "asset":{ + "generator":"Khronos glTF Blender I/O v4.4.56", + "version":"2.0" + }, + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"Sphere" + } + ], + "meshes":[ + { + "name":"Sphere", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "NORMAL":1, + "TEXCOORD_0":2 + }, + "indices":3 + } + ] + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":1984, + "max":[ + 0.9999997019767761, + 1, + 0.9999993443489075 + ], + "min":[ + -0.9999990463256836, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":1984, + "type":"VEC3" + }, + { + "bufferView":2, + "componentType":5126, + "count":1984, + "type":"VEC2" + }, + { + "bufferView":3, + "componentType":5123, + "count":2880, + "type":"SCALAR" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":23808, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":23808, + "byteOffset":23808, + "target":34962 + }, + { + "buffer":0, + "byteLength":15872, + "byteOffset":47616, + "target":34962 + }, + { + "buffer":0, + "byteLength":5760, + "byteOffset":63488, + "target":34963 + } + ], + "buffers":[ + { + "byteLength":69248, + "uri":"uvsphere.bin" + } + ] +} diff --git a/resources/models/uvsphere2.bin b/resources/models/uvsphere2.bin new file mode 100644 index 0000000..c71a8be Binary files /dev/null and b/resources/models/uvsphere2.bin differ diff --git a/resources/models/uvsphere2.gltf b/resources/models/uvsphere2.gltf new file mode 100644 index 0000000..6657f6e --- /dev/null +++ b/resources/models/uvsphere2.gltf @@ -0,0 +1,190 @@ +{ + "asset":{ + "generator":"Khronos glTF Blender I/O v4.4.56", + "version":"2.0" + }, + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0, + 1 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"Sphere", + "translation":[ + 0, + 0, + -1.0871706008911133 + ] + }, + { + "mesh":1, + "name":"Cube", + "translation":[ + 0, + 0, + 1.0190757513046265 + ] + } + ], + "meshes":[ + { + "name":"Sphere", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "NORMAL":1, + "TEXCOORD_0":2 + }, + "indices":3 + } + ] + }, + { + "name":"Cube.001", + "primitives":[ + { + "attributes":{ + "POSITION":4, + "NORMAL":5, + "TEXCOORD_0":6 + }, + "indices":7 + } + ] + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":1984, + "max":[ + 0.9999997019767761, + 1, + 0.9999993443489075 + ], + "min":[ + -0.9999990463256836, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":1984, + "type":"VEC3" + }, + { + "bufferView":2, + "componentType":5126, + "count":1984, + "type":"VEC2" + }, + { + "bufferView":3, + "componentType":5123, + "count":2880, + "type":"SCALAR" + }, + { + "bufferView":4, + "componentType":5126, + "count":24, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":5, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":6, + "componentType":5126, + "count":24, + "type":"VEC2" + }, + { + "bufferView":7, + "componentType":5123, + "count":36, + "type":"SCALAR" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":23808, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":23808, + "byteOffset":23808, + "target":34962 + }, + { + "buffer":0, + "byteLength":15872, + "byteOffset":47616, + "target":34962 + }, + { + "buffer":0, + "byteLength":5760, + "byteOffset":63488, + "target":34963 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":69248, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":69536, + "target":34962 + }, + { + "buffer":0, + "byteLength":192, + "byteOffset":69824, + "target":34962 + }, + { + "buffer":0, + "byteLength":72, + "byteOffset":70016, + "target":34963 + } + ], + "buffers":[ + { + "byteLength":70088, + "uri":"uvsphere2.bin" + } + ] +} diff --git a/assets/shaders/gl_textured.frag b/resources/shaders/gl_textured.frag similarity index 99% rename from assets/shaders/gl_textured.frag rename to resources/shaders/gl_textured.frag index b264f77..e0da565 100644 --- a/assets/shaders/gl_textured.frag +++ b/resources/shaders/gl_textured.frag @@ -31,4 +31,4 @@ void main() { result = pow(result, vec3(1.0 / 2.2)); frag_color = vec4(result, 1.0); -} +} \ No newline at end of file diff --git a/assets/shaders/gl_textured.vert b/resources/shaders/gl_textured.vert similarity index 99% rename from assets/shaders/gl_textured.vert rename to resources/shaders/gl_textured.vert index df2c27d..269c9d3 100644 --- a/assets/shaders/gl_textured.vert +++ b/resources/shaders/gl_textured.vert @@ -20,4 +20,4 @@ void main() { v_tex = tex_coords * uv_scale + uv_offset; v_position = (modelview * vec4(position, 1.0)).xyz; gl_Position = projection * modelview * vec4(position, 1.0); -} +} \ No newline at end of file diff --git a/assets/shaders/skybox.frag b/resources/shaders/skybox.frag similarity index 99% rename from assets/shaders/skybox.frag rename to resources/shaders/skybox.frag index 8418e54..4ad6a8c 100644 --- a/assets/shaders/skybox.frag +++ b/resources/shaders/skybox.frag @@ -19,4 +19,4 @@ void main() { vec2 uv = sample_spherical_map(normalize(direction)); vec3 color = texture(equirect, uv).rgb; frag_color = vec4(color, 1.0); -} +} \ No newline at end of file diff --git a/assets/shaders/skybox.vert b/resources/shaders/skybox.vert similarity index 99% rename from assets/shaders/skybox.vert rename to resources/shaders/skybox.vert index 2db3b53..fe5ce38 100644 --- a/assets/shaders/skybox.vert +++ b/resources/shaders/skybox.vert @@ -12,4 +12,4 @@ void main() { direction = position; vec4 pos = projection * view * vec4(position, 1.0); gl_Position = pos.xyww; -} +} \ No newline at end of file diff --git a/resources/skyboxes/sky_24_2k.png b/resources/skyboxes/sky_24_2k.png new file mode 100644 index 0000000..ac2d556 Binary files /dev/null and b/resources/skyboxes/sky_24_2k.png differ diff --git a/resources/textures/grass.png b/resources/textures/grass.png new file mode 100644 index 0000000..c20a364 Binary files /dev/null and b/resources/textures/grass.png differ