summaryrefslogtreecommitdiff
path: root/gfx/gl/shadowMapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shadowMapper.cpp')
-rw-r--r--gfx/gl/shadowMapper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp
index 1787ee6..7649a54 100644
--- a/gfx/gl/shadowMapper.cpp
+++ b/gfx/gl/shadowMapper.cpp
@@ -184,6 +184,13 @@ void
ShadowMapper::DynamicPoint::use(const Location & location) const
{
glUseProgram(*this);
+ setModel(location);
+ const auto model = glm::translate(location.pos) * rotate_ypr(location.rot);
+ glUniformMatrix4fv(modelLoc, 1, GL_FALSE, glm::value_ptr(model));
+}
+void
+ShadowMapper::DynamicPoint::setModel(const Location & location) const
+{
const auto model = glm::translate(location.pos) * rotate_ypr(location.rot);
glUniformMatrix4fv(modelLoc, 1, GL_FALSE, glm::value_ptr(model));
}