summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-13 10:32:47 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-13 10:32:47 +0000
commite942bec77c77201ed50a2f6ecc77f3279a6bb4df (patch)
tree2b783dba6240ecb7c3e87a71470b3833687acabe
parentMinor tidy up (diff)
downloadilt-e942bec77c77201ed50a2f6ecc77f3279a6bb4df.tar.bz2
ilt-e942bec77c77201ed50a2f6ecc77f3279a6bb4df.tar.xz
ilt-e942bec77c77201ed50a2f6ecc77f3279a6bb4df.zip
Merge common parts of light type vertices
-rw-r--r--game/scenary/illuminator.h13
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>>;