diff --git a/include/chunkmesh.hpp b/include/chunkmesh.hpp index f0e3031..b461fe6 100644 --- a/include/chunkmesh.hpp +++ b/include/chunkmesh.hpp @@ -13,7 +13,6 @@ class ChunkMesh { public: - ChunkMesh(); ChunkMesh(Chunk::Chunk *c); void mesh(); void draw(); diff --git a/src/chunkmanager.cpp b/src/chunkmanager.cpp index 076ac8c..2c05579 100644 --- a/src/chunkmanager.cpp +++ b/src/chunkmanager.cpp @@ -12,7 +12,7 @@ #include #include -std::unordered_map chunks{}; +std::unordered_map chunks; namespace chunkmanager { @@ -86,16 +86,14 @@ namespace chunkmanager // std::cout << "Checking" << i << ", " << j << ", " << k <chunk << std::endl; + // if(this->chunk != nullptr) delete this->chunk; + // this->chunk = nullptr; + // delete[] (this->theShader); } ChunkMesh::ChunkMesh(Chunk::Chunk *c) @@ -30,8 +32,6 @@ ChunkMesh::ChunkMesh(Chunk::Chunk *c) void ChunkMesh::mesh() { - if (!(this->chunk)) - return; /* * Taking inspiration from 0fps and the jme3 porting at * https://github.com/roboleary/GreedyMesh/blob/master/src/mygame/Main.java @@ -227,8 +227,6 @@ void ChunkMesh::mesh() void ChunkMesh::draw() { - if (!(this->chunk)) - return; // glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); // wireframe mode