From 74a2cf310f4891e17157b508edb0ea982b03619e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 31 Jan 2021 14:02:13 +0000 Subject: Create terrain as collection of meshes --- game/terrain.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'game/terrain.h') diff --git a/game/terrain.h b/game/terrain.h index 64c4f96..81ee128 100644 --- a/game/terrain.h +++ b/game/terrain.h @@ -1,13 +1,12 @@ #ifndef TERRAIN_H #define TERRAIN_H +#include "collection.hpp" #include "worldobject.h" -#include -#include +#include #include #include #include -#include #include #include @@ -18,9 +17,6 @@ class Terrain : public WorldObject, public Renderable { public: Terrain(); explicit Terrain(const std::string &); - ~Terrain() override; - NO_COPY(Terrain); - NO_MOVE(Terrain); void render(const Shader & shader) const override; @@ -33,8 +29,7 @@ private: Vertex & v(unsigned int width, unsigned int x, unsigned int z); - GLuint m_vertexArrayObject; - std::array m_vertexArrayBuffers; + Collection meshes; std::vector vertices; std::vector indices; std::shared_ptr texture; -- cgit v1.2.3