summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneRenderer.cpp
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.cpp
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.cpp')
-rw-r--r--gfx/gl/sceneRenderer.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/gfx/gl/sceneRenderer.cpp b/gfx/gl/sceneRenderer.cpp
index 517d51e..e0938f2 100644
--- a/gfx/gl/sceneRenderer.cpp
+++ b/gfx/gl/sceneRenderer.cpp
@@ -129,13 +129,7 @@ SceneRenderer::renderQuad() const
glBindVertexArray(0);
}
-SceneRenderer::DirectionalLightProgram::DirectionalLightProgram() :
- Program {lighting_vs, directionalLight_fs}, directionLoc {*this, "lightDirection"},
- colourLoc {*this, "lightColour"}, lightPointLoc {*this, "lightPoint"},
- lightViewProjectionLoc {*this, "lightViewProjection"},
- lightViewProjectionCountLoc {*this, "lightViewProjectionCount"}
-{
-}
+SceneRenderer::DirectionalLightProgram::DirectionalLightProgram() : Program {lighting_vs, directionalLight_fs} { }
const auto toTextureSpaceMat = glm::translate(glm::identity<glm::mat4>(), glm::vec3 {0.5F})
* glm::scale(glm::identity<glm::mat4>(), glm::vec3 {0.5F});