diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-08-26 13:55:32 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-08-26 13:59:57 +0100 |
commit | 10e0fee323e6277ba73ee1fc148417882bc381c3 (patch) | |
tree | 86d83581b6b39d3a5f2f11a420d35440106d41e5 /gfx/gl/shadowMapper.cpp | |
parent | Add a foliage vertex array for just the location data (diff) | |
download | ilt-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.cpp | 4 |
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())); } |