From ac05fbbc71282b059164b51efd68ee6e372870cb Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 20 Apr 2023 20:27:43 +0100 Subject: Switch to render trees in bulk through foliage asset rendering --- game/scenary/plant.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'game/scenary/plant.cpp') 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 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); } -- cgit v1.2.3