From fb78c88576d9fed90ee69dfa35a9fbd3179ff486 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 30 Mar 2026 13:04:36 +0100 Subject: Use a single buffer for the location/rotation data of all renderable objects Removes the BufferedLocation and BufferedLocationUpdater mess. Note: appears to break bogie rendering in asset factory test only, same symptom as broken network render test? (out of date buffer data) --- game/scenary/foliage.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'game/scenary/foliage.h') diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h index c599649..f424ffc 100644 --- a/game/scenary/foliage.h +++ b/game/scenary/foliage.h @@ -18,13 +18,13 @@ class Foliage : public Asset, public Renderable, public StdTypeDefs { public: [[nodiscard]] std::any createAt(const Location &) const override; - struct LocationVertex { - glm::mat3 rotation; - float yaw; - GlobalPosition3D position; + struct InstanceVertex { + CommonLocationInstance location; + // float scale; + // something colorBias; }; - mutable InstanceVertices instances; + mutable InstanceVertices instances; void preFrame(const Frustum &, const Frustum &) override; void render(const SceneShader &, const Frustum &) const override; void shadows(const ShadowMapper &, const Frustum &) const override; @@ -43,5 +43,5 @@ protected: glTextures billboard; private: - InstanceVertices::PartitionResult instancePartitions; + InstanceVertices::PartitionResult instancePartitions; }; -- cgit v1.3