]> git.localhorst.tv Git - blank.git/blobdiff - src/chunk.cpp
minor optimization of noise generator
[blank.git] / src / chunk.cpp
index 52d17c055319464479f8d1d7b248044de024cf52..fbfc8578ac3a93da8eab354ad1e37fa56ee07c5f 100644 (file)
@@ -111,6 +111,13 @@ glm::mat4 Chunk::Transform(const Pos &offset) const {
 }
 
 
+void Chunk::CheckUpdate() {
+       if (dirty) {
+               Update();
+       }
+       model.CheckUpdate();
+}
+
 void Chunk::Update() {
        int vtx_count = 0, idx_count = 0;
        for (const auto &block : blocks) {