From 5585b67a272704e136abe830c336603098914415 Mon Sep 17 00:00:00 2001 From: tylermurphy534 Date: Fri, 30 Sep 2022 15:40:42 -0400 Subject: finalize greedy meshing --- src/first_app.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/first_app.cpp') 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 +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); -- cgit v1.2.3-freya