summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneShader.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-10 19:04:30 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-10 19:04:30 +0000
commitb8401062e1d3f5e6554ab7fd9b983ea63cfb05c5 (patch)
treeba5c4f944cee1fa04b4aba8b018c3f1f7864490e /gfx/gl/sceneShader.h
parentAdd spot light definition, loader, and rendering (diff)
downloadilt-b8401062e1d3f5e6554ab7fd9b983ea63cfb05c5.tar.bz2
ilt-b8401062e1d3f5e6554ab7fd9b983ea63cfb05c5.tar.xz
ilt-b8401062e1d3f5e6554ab7fd9b983ea63cfb05c5.zip
Initial commit with working light instancing
Diffstat (limited to 'gfx/gl/sceneShader.h')
-rw-r--r--gfx/gl/sceneShader.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/gfx/gl/sceneShader.h b/gfx/gl/sceneShader.h
index 7ffaacd..7e31cb8 100644
--- a/gfx/gl/sceneShader.h
+++ b/gfx/gl/sceneShader.h
@@ -65,31 +65,13 @@ class SceneShader {
glBuffer b;
};
- class SpotLightShader : public SceneProgram {
- public:
- SpotLightShader();
-
- void add(const Position3D & position, const Direction3D & direction, const RGB & colour, const float kq,
- const float arc) const;
-
- private:
- UniformLocation directionLoc;
- UniformLocation colourLoc;
- UniformLocation kqLoc;
- UniformLocation arcLoc;
- UniformLocation viewPointLoc;
- glVertexArray va;
- glBuffer b;
- };
-
public:
SceneShader();
BasicProgram basic;
WaterProgram water;
- AbsolutePosProgram basicInst, landmass, absolute;
+ AbsolutePosProgram basicInst, landmass, absolute, spotLightInst;
PointLightShader pointLight;
- SpotLightShader spotLight;
void setViewProjection(const GlobalPosition3D & viewPoint, const glm::mat4 & viewProjection) const;
void setViewPort(const ViewPort & viewPort) const;