summary refs log tree commit diff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b0939c1..a264f3e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -102,10 +102,10 @@ void run() {
 
         glClearColor(sky_color.x(), sky_color.y(), sky_color.z(), 1.0f); // #DBDBDB
         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-        for (auto& chunk : world.get_visible_chunks(camera.position())) {
-            auto model = Math::MVP::model(chunk.chunk.value().position(), {});
+        for (auto chunk : world.get_visible_chunks(camera.position())) {
+            auto model = Math::MVP::model(chunk->chunk.value().position(), {});
             model_uniform.set(model);
-            render(chunk.mesh.value(), texture);
+            render(chunk->mesh.value(), texture);
         }
 
         time++;