summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-10-17 18:27:50 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-10-17 18:28:41 +0100
commit33a691f6ab681160b377102aa02e78ccdfaf1ec3 (patch)
tree5c225f598c863a7bea93b171fc5015c22f7547ea
parentRe-express viewProjections calculations as a fold expression (diff)
downloadilt-33a691f6ab681160b377102aa02e78ccdfaf1ec3.tar.bz2
ilt-33a691f6ab681160b377102aa02e78ccdfaf1ec3.tar.xz
ilt-33a691f6ab681160b377102aa02e78ccdfaf1ec3.zip
Misc readability fixes
-rw-r--r--gfx/gl/shadowStenciller.cpp6
-rw-r--r--gfx/gl/shadowStenciller.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/gfx/gl/shadowStenciller.cpp b/gfx/gl/shadowStenciller.cpp
index 89b61cc..eab4797 100644
--- a/gfx/gl/shadowStenciller.cpp
+++ b/gfx/gl/shadowStenciller.cpp
@@ -67,8 +67,8 @@ ShadowStenciller::renderStencil(const glTexture & stencil, const MeshBase & mesh
glUniform(viewProjectionLoc,
std::span<const glm::mat4> {viewProjections *
[extentsMat = glm::translate(glm::ortho(-size, size, -size, size, -size, size), -centre)](
- const auto & vp) {
- return vp * extentsMat;
- }});
+ const auto & viewProjection) {
+ return viewProjection * extentsMat;
+ }});
mesh.Draw();
}
diff --git a/gfx/gl/shadowStenciller.h b/gfx/gl/shadowStenciller.h
index ac83eb1..f774ac7 100644
--- a/gfx/gl/shadowStenciller.h
+++ b/gfx/gl/shadowStenciller.h
@@ -16,7 +16,7 @@ public:
[[nodiscard]]
static glTexture createStencilTexture(GLsizei width, GLsizei height);
void setLightDirection(const LightDirection & lightDir);
- void renderStencil(const glTexture &, const MeshBase &, const Texture::AnyPtr texture) const;
+ void renderStencil(const glTexture &, const MeshBase &, Texture::AnyPtr texture) const;
private:
glFrameBuffer fbo;