From 72ab29786f6d4c97a92cb95c75091537490e2d0f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 6 May 2023 16:42:08 +0100 Subject: Templated BufferedLocation and single buffer storage for RVC locations --- game/vehicles/railVehicleClass.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'game/vehicles/railVehicleClass.h') diff --git a/game/vehicles/railVehicleClass.h b/game/vehicles/railVehicleClass.h index 2fda8f7..80b3fda 100644 --- a/game/vehicles/railVehicleClass.h +++ b/game/vehicles/railVehicleClass.h @@ -18,6 +18,10 @@ public: void render(const SceneShader & shader) const override; void shadows(const ShadowMapper & shadowMapper) const override; + struct LocationVertex { + glm::mat4 body, front, back; + }; + std::array bogies; Mesh::Ptr bodyMesh; std::shared_ptr texture; @@ -25,8 +29,8 @@ public: float length; float maxSpeed; - mutable InstanceVertices instancesBody; - mutable std::array, 2> instancesBogies; + mutable InstanceVertices instances; + using Instance = decltype(instances)::InstanceProxy; protected: friend Persistence::SelectionPtrBase>; -- cgit v1.2.3