diff options
author | tylermurphy534 <tylermurphy534@gmail.com> | 2022-09-28 19:36:35 -0400 |
---|---|---|
committer | tylermurphy534 <tylermurphy534@gmail.com> | 2022-09-28 19:36:35 -0400 |
commit | fdbe207540541b26d2800f87ddd77006d5fdf4f3 (patch) | |
tree | ec87219d904d2cf4e40f2487b5b795d6a99e5480 /src/chunk.hpp | |
parent | only wait for buffers once. fix chunk mesh edges (diff) | |
download | minecraftvulkan-fdbe207540541b26d2800f87ddd77006d5fdf4f3.tar.gz minecraftvulkan-fdbe207540541b26d2800f87ddd77006d5fdf4f3.tar.bz2 minecraftvulkan-fdbe207540541b26d2800f87ddd77006d5fdf4f3.zip |
async chunk generation
Diffstat (limited to 'src/chunk.hpp')
-rw-r--r-- | src/chunk.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/chunk.hpp b/src/chunk.hpp index c53a0d3..734c07b 100644 --- a/src/chunk.hpp +++ b/src/chunk.hpp @@ -44,10 +44,15 @@ class Chunk { static void createMesh(Chunk* c); static void createMeshAsync(Chunk* c); + static void generate(Chunk* c); + static void generateAsync(Chunk* c); + xe::Model* getMesh(); uint8_t getBlock(int32_t x, int32_t y, int32_t z); void setBlock(int32_t x, int32_t y, int32_t z, uint8_t block); + static bool isGenerated(int32_t gridX, int32_t gridZ); + const int32_t gridX, gridZ; const uint32_t world_seed, chunk_seed; @@ -56,10 +61,10 @@ class Chunk { Chunk(int32_t gridX, int32_t gridZ, uint32_t world_seed); ~Chunk(); - void generate(); static void addVerticies(Chunk* c, uint8_t side, int32_t x, int32_t y, int32_t z, uint8_t block); - bool reloadRequired{false}; + bool generated{false}; + bool reload{false}; bool working{false}; xe::Model* chunkMesh; |