summaryrefslogtreecommitdiff
path: root/game/terrain.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-04-06 00:47:37 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-04-06 00:47:37 +0100
commit737ce277a6e49d88a04be1e384eef09d486f513b (patch)
tree2eeb29d316567b1157d7a32753658df5c5f36741 /game/terrain.cpp
parentMerge remote-tracking branch 'origin/deform-terrain' (diff)
downloadilt-737ce277a6e49d88a04be1e384eef09d486f513b.tar.bz2
ilt-737ce277a6e49d88a04be1e384eef09d486f513b.tar.xz
ilt-737ce277a6e49d88a04be1e384eef09d486f513b.zip
Split water from terrain
Shares the geo data instance, and still has the same implementation at this stage.
Diffstat (limited to 'game/terrain.cpp')
-rw-r--r--game/terrain.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/game/terrain.cpp b/game/terrain.cpp
index 91a228f..201c732 100644
--- a/game/terrain.cpp
+++ b/game/terrain.cpp
@@ -15,9 +15,7 @@
#include <utility>
#include <vector>
-Terrain::Terrain(std::shared_ptr<GeoData> tm) :
- geoData {std::move(tm)}, grass {std::make_shared<Texture>("grass.png")},
- water {std::make_shared<Texture>("water.png")}
+Terrain::Terrain(std::shared_ptr<GeoData> tm) : geoData {std::move(tm)}, grass {std::make_shared<Texture>("grass.png")}
{
generateMeshes();
}
@@ -47,9 +45,8 @@ Terrain::generateMeshes()
}
void
-Terrain::tick(TickDuration dur)
+Terrain::tick(TickDuration)
{
- waveCycle += dur.count();
}
void
@@ -58,10 +55,6 @@ Terrain::render(const SceneShader & shader) const
shader.landmass.use();
grass->bind();
meshes.apply(&Mesh::Draw);
-
- shader.water.use(waveCycle);
- water->bind();
- meshes.apply(&Mesh::Draw);
}
void