summaryrefslogtreecommitdiff
path: root/game/scenary/plant.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-22 19:06:42 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-22 19:06:42 +0100
commitd1f79b4c438ebf0822741e103b2cb06bdee4514e (patch)
treea4d574d12cd81d5e33886ce7ca961f7dbe872fcf /game/scenary/plant.h
parentRename lots of shader files (diff)
parentKeep the instance unused vector sorted and binary search it (diff)
downloadilt-d1f79b4c438ebf0822741e103b2cb06bdee4514e.tar.bz2
ilt-d1f79b4c438ebf0822741e103b2cb06bdee4514e.tar.xz
ilt-d1f79b4c438ebf0822741e103b2cb06bdee4514e.zip
Merge branch 'instancing'
Diffstat (limited to 'game/scenary/plant.h')
-rw-r--r--game/scenary/plant.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/game/scenary/plant.h b/game/scenary/plant.h
index 55acca1..77c5979 100644
--- a/game/scenary/plant.h
+++ b/game/scenary/plant.h
@@ -2,15 +2,13 @@
#include "foliage.h"
#include "game/worldobject.h"
-#include "gfx/renderable.h"
#include "location.hpp"
+#include "maths.h"
+#include <glm/gtx/transform.hpp>
-class Plant : public Renderable, public WorldObject {
+class Plant : public WorldObject {
std::shared_ptr<const Foliage> type;
- Location position;
-
- void render(const SceneShader & shader) const override;
- void shadows(const ShadowMapper & shadowMapper) const override;
+ InstanceVertices<glm::mat4>::InstanceProxy location;
void
tick(TickDuration) override
@@ -18,5 +16,5 @@ class Plant : public Renderable, public WorldObject {
}
public:
- Plant(std::shared_ptr<const Foliage> type, Location position) : type(std::move(type)), position(position) { }
+ Plant(std::shared_ptr<const Foliage> type, Location position);
};