From 50d6f63fb28c82a35e68914fe941b685d26f6e89 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 23 Nov 2022 19:07:18 +0000 Subject: Add rendering support for point lights --- gfx/gl/sceneShader.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gfx/gl/sceneShader.h') diff --git a/gfx/gl/sceneShader.h b/gfx/gl/sceneShader.h index 99431f1..62df9bf 100644 --- a/gfx/gl/sceneShader.h +++ b/gfx/gl/sceneShader.h @@ -1,6 +1,7 @@ #pragma once #include "program.h" +#include class Location; @@ -47,12 +48,26 @@ class SceneShader { RequiredUniformLocation waveLoc; }; + class PointLightShader : public SceneProgram { + public: + PointLightShader(); + + void add(const glm::vec3 & position, const glm::vec3 & colour, const float kq) const; + + private: + UniformLocation colourLoc; + UniformLocation kqLoc; + glVertexArray va; + glBuffer b; + }; + public: SceneShader(); BasicProgram basic; WaterProgram water; AbsolutePosProgram landmass, absolute; + PointLightShader pointLight; void setViewProjection(const glm::mat4 & viewProjection) const; void setViewPort(const glm::ivec4 & viewPort) const; -- cgit v1.2.3