This commit is contained in:
griffi-gh 2023-01-16 20:02:13 +01:00
parent ded39c285e
commit 2a647604ff
2 changed files with 8 additions and 0 deletions

View file

@ -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()

View file

@ -0,0 +1,5 @@
use crate::game::world::chunk::Chunk;
pub fn generate_mesh(chunk: &Chunk, neighbors: [&Chunk; 4]) {
}