summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneRenderer.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-07-07 23:21:25 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-07-07 23:21:25 +0100
commit07064efcfecb0f1140f829ee2481079fa02cc587 (patch)
treead9914fc74c46cacbfb6a1187ce99cb89171521a /gfx/gl/sceneRenderer.h
parentAdd shadow shader which takes into account texture transparency (diff)
downloadilt-07064efcfecb0f1140f829ee2481079fa02cc587.tar.bz2
ilt-07064efcfecb0f1140f829ee2481079fa02cc587.tar.xz
ilt-07064efcfecb0f1140f829ee2481079fa02cc587.zip
Simplify setup of uniform locations and containing programs
Diffstat (limited to 'gfx/gl/sceneRenderer.h')
-rw-r--r--gfx/gl/sceneRenderer.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/gfx/gl/sceneRenderer.h b/gfx/gl/sceneRenderer.h
index 021936f..4195bcf 100644
--- a/gfx/gl/sceneRenderer.h
+++ b/gfx/gl/sceneRenderer.h
@@ -42,8 +42,11 @@ protected:
const RGB &, const Direction3D &, const GlobalPosition3D &, const std::span<const glm::mat4x4>) const;
private:
- RequiredUniformLocation directionLoc, colourLoc, lightPointLoc, lightViewProjectionLoc,
- lightViewProjectionCountLoc;
+ RequiredUniformLocation directionLoc {*this, "lightDirection"};
+ RequiredUniformLocation colourLoc {*this, "lightColour"};
+ RequiredUniformLocation lightPointLoc {*this, "lightPoint"};
+ RequiredUniformLocation lightViewProjectionLoc {*this, "lightViewProjection"};
+ RequiredUniformLocation lightViewProjectionCountLoc {*this, "lightViewProjectionCount"};
};
DeferredLightProgram lighting;