From 737ce277a6e49d88a04be1e384eef09d486f513b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 6 Apr 2024 00:47:37 +0100 Subject: Split water from terrain Shares the geo data instance, and still has the same implementation at this stage. --- game/terrain.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'game/terrain.cpp') 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 #include -Terrain::Terrain(std::shared_ptr tm) : - geoData {std::move(tm)}, grass {std::make_shared("grass.png")}, - water {std::make_shared("water.png")} +Terrain::Terrain(std::shared_ptr tm) : geoData {std::move(tm)}, grass {std::make_shared("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 -- cgit v1.2.3