From 5b415937c6c7097373bfd754b5699a9946c2cd16 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 23 Nov 2022 17:53:32 +0000 Subject: Support setting a viewPort uniform for those shaders which need it --- gfx/gl/sceneShader.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gfx/gl/sceneShader.h') diff --git a/gfx/gl/sceneShader.h b/gfx/gl/sceneShader.h index 8094e0a..99431f1 100644 --- a/gfx/gl/sceneShader.h +++ b/gfx/gl/sceneShader.h @@ -8,14 +8,17 @@ class SceneShader { class SceneProgram : public Program { public: template - inline SceneProgram(const S &... srcs) : Program {srcs...}, viewProjectionLoc {*this, "viewProjection"} + inline SceneProgram(const S &... srcs) : + Program {srcs...}, viewProjectionLoc {*this, "viewProjection"}, viewPortLoc {*this, "viewPort"} { } void setViewProjection(const glm::mat4 &) const; + void setViewPort(const glm::ivec4 &) const; private: RequiredUniformLocation viewProjectionLoc; + UniformLocation viewPortLoc; }; class BasicProgram : public SceneProgram { @@ -52,4 +55,5 @@ public: AbsolutePosProgram landmass, absolute; void setViewProjection(const glm::mat4 & viewProjection) const; + void setViewPort(const glm::ivec4 & viewPort) const; }; -- cgit v1.2.3