summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneShader.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-13 11:31:13 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-13 11:31:13 +0000
commit332355a9f4a4199e0ddb51852546d44ec54e176f (patch)
tree4998cde56004f53a0218dc5f00d578f939ffea08 /gfx/gl/sceneShader.h
parentInteger support in persistence (diff)
parentOnly create VAOs for the light type(s) in use (diff)
downloadilt-332355a9f4a4199e0ddb51852546d44ec54e176f.tar.bz2
ilt-332355a9f4a4199e0ddb51852546d44ec54e176f.tar.xz
ilt-332355a9f4a4199e0ddb51852546d44ec54e176f.zip
Merge branch 'model-lights'
Diffstat (limited to 'gfx/gl/sceneShader.h')
-rw-r--r--gfx/gl/sceneShader.h35
1 files changed, 1 insertions, 34 deletions
diff --git a/gfx/gl/sceneShader.h b/gfx/gl/sceneShader.h
index 7ffaacd..813c1bf 100644
--- a/gfx/gl/sceneShader.h
+++ b/gfx/gl/sceneShader.h
@@ -51,45 +51,12 @@ class SceneShader {
RequiredUniformLocation waveLoc;
};
- class PointLightShader : public SceneProgram {
- public:
- PointLightShader();
-
- void add(const Position3D & position, const RGB & colour, const float kq) const;
-
- private:
- UniformLocation colourLoc;
- UniformLocation kqLoc;
- UniformLocation viewPointLoc;
- glVertexArray va;
- 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;
- PointLightShader pointLight;
- SpotLightShader spotLight;
+ AbsolutePosProgram basicInst, landmass, absolute, spotLightInst, pointLightInst;
void setViewProjection(const GlobalPosition3D & viewPoint, const glm::mat4 & viewProjection) const;
void setViewPort(const ViewPort & viewPort) const;