summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowMapper.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-08-26 13:55:32 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-08-26 13:59:57 +0100
commit10e0fee323e6277ba73ee1fc148417882bc381c3 (patch)
tree86d83581b6b39d3a5f2f11a420d35440106d41e5 /gfx/gl/shadowMapper.cpp
parentAdd a foliage vertex array for just the location data (diff)
downloadilt-10e0fee323e6277ba73ee1fc148417882bc381c3.tar.bz2
ilt-10e0fee323e6277ba73ee1fc148417882bc381c3.tar.xz
ilt-10e0fee323e6277ba73ee1fc148417882bc381c3.zip
Add helper to test if a uniform was found
Diffstat (limited to 'gfx/gl/shadowMapper.cpp')
-rw-r--r--gfx/gl/shadowMapper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp
index 55167e5..177bd22 100644
--- a/gfx/gl/shadowMapper.cpp
+++ b/gfx/gl/shadowMapper.cpp
@@ -139,7 +139,9 @@ ShadowMapper::ShadowProgram::setView(const std::span<const glm::mat4x4> viewProj
use();
glUniform(viewPointLoc, viewPoint);
glUniform(viewProjectionLoc, viewProjection);
- glUniform(sizesLoc, sizes);
+ if (sizesLoc) {
+ glUniform(sizesLoc, sizes);
+ }
glUniform(viewProjectionsLoc, static_cast<GLint>(viewProjection.size()));
}