From 2a647604ff8024a9ea7e1f99f41eb798fdb3ded4 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Mon, 16 Jan 2023 20:02:13 +0100 Subject: [PATCH] a --- src/game/world/thread.rs | 3 +++ src/game/world/thread/mesh_gen.rs | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/game/world/thread.rs b/src/game/world/thread.rs index 86b2c5c..3cba978 100644 --- a/src/game/world/thread.rs +++ b/src/game/world/thread.rs @@ -21,6 +21,9 @@ impl WorldThreading { self.load_tasks.is_empty() && self.mesh_tasks.is_empty() } + pub fn task_amount(&self) -> usize { + self.load_tasks.len() + self.mesh_tasks.len() + } pub fn queue_load(&mut self, position: IVec2) { let handle = thread::spawn(|| { world_gen::generate_chunk() diff --git a/src/game/world/thread/mesh_gen.rs b/src/game/world/thread/mesh_gen.rs index e69de29..8f2d22b 100644 --- a/src/game/world/thread/mesh_gen.rs +++ b/src/game/world/thread/mesh_gen.rs @@ -0,0 +1,5 @@ +use crate::game::world::chunk::Chunk; + +pub fn generate_mesh(chunk: &Chunk, neighbors: [&Chunk; 4]) { + +}