diff options
Diffstat (limited to 'game/water.h')
-rw-r--r-- | game/water.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/game/water.h b/game/water.h new file mode 100644 index 0000000..20796d7 --- /dev/null +++ b/game/water.h @@ -0,0 +1,29 @@ +#pragma once + +#include "chronology.h" +#include "collection.h" +#include "game/worldobject.h" +#include <gfx/models/mesh.h> +#include <gfx/renderable.h> +#include <memory> + +class SceneShader; +class Texture; +class GeoData; + +class Water : public WorldObject, public Renderable { +public: + explicit Water(std::shared_ptr<GeoData>); + + void render(const SceneShader & shader) const override; + + void tick(TickDuration) override; + float waveCycle {0.F}; + +private: + void generateMeshes(); + + std::shared_ptr<GeoData> geoData; + Collection<Mesh, false> meshes; + std::shared_ptr<Texture> water; +}; |