summaryrefslogtreecommitdiff
path: root/game/terrain.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-10-27 15:52:47 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-10-27 15:52:47 +0000
commitf35a245c1bd621f3af2956fb0e6dd01b0e23f421 (patch)
tree2ef284c46d546b247576d2937a0ceec4af201114 /game/terrain.cpp
parentAdd stream support for tuples (diff)
downloadilt-f35a245c1bd621f3af2956fb0e6dd01b0e23f421.tar.bz2
ilt-f35a245c1bd621f3af2956fb0e6dd01b0e23f421.tar.xz
ilt-f35a245c1bd621f3af2956fb0e6dd01b0e23f421.zip
Support regenerating the terrain mesh from updated geodata
Diffstat (limited to 'game/terrain.cpp')
-rw-r--r--game/terrain.cpp1
1 files changed, 1 insertions, 0 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;