diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-20 20:27:43 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-20 20:27:43 +0100 |
commit | ac05fbbc71282b059164b51efd68ee6e372870cb (patch) | |
tree | a505ed3e38a8e2419c1d706f45dd39873b627962 /game/scenary/plant.h | |
parent | Expose bufferName and count from InstanceVertices (diff) | |
download | ilt-ac05fbbc71282b059164b51efd68ee6e372870cb.tar.bz2 ilt-ac05fbbc71282b059164b51efd68ee6e372870cb.tar.xz ilt-ac05fbbc71282b059164b51efd68ee6e372870cb.zip |
Switch to render trees in bulk through foliage asset rendering
Diffstat (limited to 'game/scenary/plant.h')
-rw-r--r-- | game/scenary/plant.h | 12 |
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); }; |