summaryrefslogtreecommitdiff
path: root/src/first_app.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/first_app.cpp7
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);