From e942bec77c77201ed50a2f6ecc77f3279a6bb4df Mon Sep 17 00:00:00 2001 From: Dan Goodliffe <dan@randomdan.homeip.net> Date: Sat, 13 Jan 2024 10:32:47 +0000 Subject: Merge common parts of light type vertices --- game/scenary/illuminator.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'game/scenary') diff --git a/game/scenary/illuminator.h b/game/scenary/illuminator.h index a2b287d..1c493b2 100644 --- a/game/scenary/illuminator.h +++ b/game/scenary/illuminator.h @@ -14,20 +14,19 @@ class Illuminator : public Asset, public Renderable, public StdTypeDefs<Illumina glVertexArray instanceVAO, instancesSpotLightVAO, instancesPointLightVAO; public: - struct SpotLightVertex { + struct LightCommonVertex { RelativePosition3D position; - Direction3D direction; RGB colour; RelativeDistance kq; - Angle arc; }; - struct PointLightVertex { - RelativePosition3D position; - RGB colour; - RelativeDistance kq; + struct SpotLightVertex : LightCommonVertex { + Direction3D direction; + Angle arc; }; + struct PointLightVertex : LightCommonVertex { }; + struct SpotLight : Persistence::Persistable, SpotLightVertex, StdTypeDefs<SpotLight> { private: friend Persistence::SelectionPtrBase<std::shared_ptr<SpotLight>>; -- cgit v1.2.3