diff options
-rw-r--r-- | game/terrain.cpp | 1 | ||||
-rw-r--r-- | game/terrain.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/game/terrain.cpp b/game/terrain.cpp index 3b16e79..bb8e3ce 100644 --- a/game/terrain.cpp +++ b/game/terrain.cpp @@ -33,6 +33,7 @@ VertexArrayObject::addAttribsFor<Terrain::Vertex>(const GLuint arrayBuffer, cons void Terrain::generateMeshes() { + meshes.removeAll(); std::vector<unsigned int> indices; indices.reserve(geoData->n_faces() * 3); std::vector<Vertex> vertices; diff --git a/game/terrain.h b/game/terrain.h index 1c79d19..7d074cf 100644 --- a/game/terrain.h +++ b/game/terrain.h @@ -27,9 +27,9 @@ public: RGB colourBias; }; -private: void generateMeshes(); +private: std::shared_ptr<GeoData> geoData; Collection<MeshT<Vertex>, false> meshes; Texture::Ptr grass; |