From bb693756b9aace889f806a768b54655023d163ab Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 9 Jan 2024 20:17:55 +0000 Subject: Add the Illuminator (type) and Light (instance) classes --- game/scenary/illuminator.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 game/scenary/illuminator.h (limited to 'game/scenary/illuminator.h') diff --git a/game/scenary/illuminator.h b/game/scenary/illuminator.h new file mode 100644 index 0000000..db9acfb --- /dev/null +++ b/game/scenary/illuminator.h @@ -0,0 +1,26 @@ +#pragma once + +#include "assetFactory/asset.h" +#include "gfx/gl/instanceVertices.h" +#include "gfx/renderable.h" + +class SceneShader; +class Location; +class Texture; + +class Illuminator : public Asset, public Renderable, public StdTypeDefs { + Mesh::Ptr bodyMesh; + std::shared_ptr texture; + glVertexArray instanceVAO; + +public: + using LocationVertex = std::pair; + mutable InstanceVertices instances; + void render(const SceneShader &) const override; + void lights(const SceneShader &) const override; + +protected: + friend Persistence::SelectionPtrBase>; + bool persist(Persistence::PersistenceStore & store) override; + void postLoad() override; +}; -- cgit v1.2.3