summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneShader.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/sceneShader.h')
-rw-r--r--gfx/gl/sceneShader.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/gfx/gl/sceneShader.h b/gfx/gl/sceneShader.h
index f46b842..154dc17 100644
--- a/gfx/gl/sceneShader.h
+++ b/gfx/gl/sceneShader.h
@@ -11,15 +11,16 @@ class SceneShader {
public:
template<typename... S>
inline explicit SceneProgram(const S &... srcs) :
- Program {srcs...}, viewProjectionLoc {*this, "viewProjection"}, viewPortLoc {*this, "viewPort"}
+ Program {srcs...}, viewProjectionLoc {*this, "viewProjection"}, viewPointLoc {*this, "viewPoint"},
+ viewPortLoc {*this, "viewPort"}
{
}
- void setViewProjection(const glm::mat4 &) const;
+ void setViewProjection(const Position3D &, const glm::mat4 &) const;
void setViewPort(const ViewPort &) const;
private:
- RequiredUniformLocation viewProjectionLoc;
+ RequiredUniformLocation viewProjectionLoc, viewPointLoc;
UniformLocation viewPortLoc;
};
@@ -58,6 +59,7 @@ class SceneShader {
private:
UniformLocation colourLoc;
UniformLocation kqLoc;
+ UniformLocation viewPointLoc;
glVertexArray va;
glBuffer b;
};
@@ -74,6 +76,7 @@ class SceneShader {
UniformLocation colourLoc;
UniformLocation kqLoc;
UniformLocation arcLoc;
+ UniformLocation viewPointLoc;
glVertexArray va;
glBuffer b;
};
@@ -87,6 +90,6 @@ public:
PointLightShader pointLight;
SpotLightShader spotLight;
- void setViewProjection(const glm::mat4 & viewProjection) const;
+ void setViewProjection(const Position3D & viewPoint, const glm::mat4 & viewProjection) const;
void setViewPort(const ViewPort & viewPort) const;
};