diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-13 10:32:47 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-13 10:32:47 +0000 |
commit | e942bec77c77201ed50a2f6ecc77f3279a6bb4df (patch) | |
tree | 2b783dba6240ecb7c3e87a71470b3833687acabe /game | |
parent | Minor tidy up (diff) | |
download | ilt-e942bec77c77201ed50a2f6ecc77f3279a6bb4df.tar.bz2 ilt-e942bec77c77201ed50a2f6ecc77f3279a6bb4df.tar.xz ilt-e942bec77c77201ed50a2f6ecc77f3279a6bb4df.zip |
Merge common parts of light type vertices
Diffstat (limited to 'game')
-rw-r--r-- | game/scenary/illuminator.h | 13 |
1 files changed, 6 insertions, 7 deletions
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>>; |