diff options
author | tylermurphy534 <tylermurphy534@gmail.com> | 2022-09-30 15:40:42 -0400 |
---|---|---|
committer | tylermurphy534 <tylermurphy534@gmail.com> | 2022-09-30 15:40:42 -0400 |
commit | 5585b67a272704e136abe830c336603098914415 (patch) | |
tree | 6a154b6c71fc5d1dcd57fc391a6384c60b190da8 /src/first_app.cpp | |
parent | greedy mesh texturing (diff) | |
download | minecraftvulkan-5585b67a272704e136abe830c336603098914415.tar.gz minecraftvulkan-5585b67a272704e136abe830c336603098914415.tar.bz2 minecraftvulkan-5585b67a272704e136abe830c336603098914415.zip |
finalize greedy meshing
Diffstat (limited to '')
-rwxr-xr-x | src/first_app.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/first_app.cpp b/src/first_app.cpp index 619a810..eb24587 100755 --- a/src/first_app.cpp +++ b/src/first_app.cpp @@ -1,5 +1,8 @@ #include "first_app.hpp" +#include <chrono> +using namespace std::chrono; + namespace app { FirstApp::FirstApp() : xeEngine{WIDTH, HEIGHT, "Minecraft Vulkan", "res/image/icon.png"} {}; @@ -35,7 +38,7 @@ void FirstApp::run() { renderer.render(loadedChunks, xeEngine.getCamera()); xeEngine.endFrame(); } - + reloadLoadedChunks(viewerObject); } @@ -78,7 +81,7 @@ void FirstApp::reloadLoadedChunks(xe::GameObject& viewer) { Chunk* chunk = Chunk::getChunk(newGridX, newGridZ); if(chunk == nullptr) { chunk = Chunk::newChunk(newGridX, newGridZ, 12345); - Chunk::generate(chunk); + Chunk::generateAsync(chunk); } if(chunk->getMesh() == nullptr){ Chunk::createMeshAsync(chunk); |