summaryrefslogtreecommitdiff
path: root/game/terrain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/terrain.cpp')
-rw-r--r--game/terrain.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/game/terrain.cpp b/game/terrain.cpp
index 44fd41d..bf16439 100644
--- a/game/terrain.cpp
+++ b/game/terrain.cpp
@@ -3,11 +3,11 @@
#include <cache.h>
#include <cmath>
#include <gfx/gl/shader.h>
-#include <gfx/gl/transform.h>
#include <gfx/image.h>
#include <gfx/models/mesh.h>
#include <gfx/models/vertex.hpp>
#include <glm/glm.hpp>
+#include <location.hpp>
#include <random>
#include <stb_image.h>
@@ -121,9 +121,6 @@ Terrain::finish(unsigned int width, unsigned int height, std::vector<Vertex> & v
meshes.create<Mesh>(vertices, indices);
}
-static const Transform identity {};
-static const auto identityModel {identity.GetModel()};
-
void
Terrain::tick(TickDuration dur)
{
@@ -133,11 +130,11 @@ Terrain::tick(TickDuration dur)
void
Terrain::render(const Shader & shader) const
{
- shader.setModel(identityModel, Shader::Program::LandMass);
+ shader.setModel(Location {}, Shader::Program::LandMass);
grass->Bind();
meshes.apply(&Mesh::Draw);
- shader.setModel(identityModel, Shader::Program::Water);
+ shader.setModel(Location {}, Shader::Program::Water);
shader.setUniform("waves", {waveCycle, 0, 0});
water->Bind();
meshes.apply(&Mesh::Draw);