kitgit

tirbofish/dropbear · commit

53ee18b19d936451c2cf7373745d2a8dd7f6197c

optimised model loading, but am using the gltf crate instead of russimp-ng. this lowers down the import speed for 2 models from 10 seconds to 3 seconds. I'm not exactly sure how to optimise it, but im sure as hell that i need to implement async/await into the project. i suppose thats for another time... this should resolve Optimise Model Loading Fixes #41 for the timebeing

Unverified

tk <4tkbytes@pm.me> · 2025-09-13 15:42

view full diff

diff --git a/Cargo.toml b/Cargo.toml
index 843b111..67d6556 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -51,6 +51,10 @@ winit = { version = "0.30", features = [] }
 zip = "5.1"
 walkdir = "2.3"
 wasmer = { version = "6.1.0-rc.3" }
+rayon = "1.11"
+
+gltf = "1"
+thiserror = "2.0"
 
 [workspace.dependencies.image]
 version = "0.25"
diff --git a/dropbear-engine/Cargo.toml b/dropbear-engine/Cargo.toml
index 9cb8c64..3e42370 100644
--- a/dropbear-engine/Cargo.toml
+++ b/dropbear-engine/Cargo.toml
@@ -23,7 +23,7 @@ gilrs.workspace = true
 glam.workspace = true
 log.workspace = true
 log-once.workspace = true
-russimp-ng.workspace = true
+# russimp-ng.workspace = true
 serde.workspace = true
 spin_sleep.workspace = true
 wgpu.workspace = true
@@ -32,6 +32,8 @@ hecs.workspace = true
 # once_cell.workspace = true
 parking_lot.workspace = true
 lazy_static.workspace = true
+gltf.workspace = true
+rayon.workspace = true
 
 [target.'cfg(not(target_os = "android"))'.dependencies]
 rfd.workspace = true
diff --git a/dropbear-engine/src/graphics.rs b/dropbear-engine/src/graphics.rs
index c8d3999..55f12ee 100644
--- a/dropbear-engine/src/graphics.rs
+++ b/dropbear-engine/src/graphics.rs
@@ -1,4 +1,4 @@
-use std::{fs, path::PathBuf};
+use std::{fs, path::PathBuf, time::Instant};
 
 use egui::Context;
 use glam::{DMat4, DQuat, DVec3, Mat3};
@@ -23,6 +23,7 @@ pub struct Graphics<'a> {
     pub view: &'a TextureView,
     pub encoder: &'a mut CommandEncoder,

Large diffs are not rendered by default. Showing the first 50 of 1036 lines. Show full diff