summaryrefslogtreecommitdiff
path: root/game/scenary/plant.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-20 20:27:43 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-20 20:27:43 +0100
commitac05fbbc71282b059164b51efd68ee6e372870cb (patch)
treea505ed3e38a8e2419c1d706f45dd39873b627962 /game/scenary/plant.cpp
parentExpose bufferName and count from InstanceVertices (diff)
downloadilt-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.cpp')
-rw-r--r--game/scenary/plant.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/game/scenary/plant.cpp b/game/scenary/plant.cpp
index 2b01bee..678d4a7 100644
--- a/game/scenary/plant.cpp
+++ b/game/scenary/plant.cpp
@@ -1,13 +1,7 @@
#include "plant.h"
-void
-Plant::render(const SceneShader & shader) const
+Plant::Plant(std::shared_ptr<const Foliage> type, Location position) :
+ type {std::move(type)},
+ location {this->type->instances.acquire(glm::translate(position.pos) * rotate_ypr(position.rot))}
{
- type->render(shader, position);
-}
-
-void
-Plant::shadows(const ShadowMapper & mapper) const
-{
- type->shadows(mapper, position);
}