diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-01 15:53:54 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-01 15:53:54 +0000 |
commit | 69e6b7d2d349dcc42d2d415a72181ba729d5a19d (patch) | |
tree | 5d7dff2f2775701069806eceb4eaef23b22eba3f /gfx/gl | |
parent | Remove legacy Position types from shadowMapper (diff) | |
download | ilt-69e6b7d2d349dcc42d2d415a72181ba729d5a19d.tar.bz2 ilt-69e6b7d2d349dcc42d2d415a72181ba729d5a19d.tar.xz ilt-69e6b7d2d349dcc42d2d415a72181ba729d5a19d.zip |
Remove more use of legacy types
Diffstat (limited to 'gfx/gl')
-rw-r--r-- | gfx/gl/bufferedLocation.cpp | 4 | ||||
-rw-r--r-- | gfx/gl/camera.cpp | 4 | ||||
-rw-r--r-- | gfx/gl/shadowMapper.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/gfx/gl/bufferedLocation.cpp b/gfx/gl/bufferedLocation.cpp index d6a63b9..f1bedfe 100644 --- a/gfx/gl/bufferedLocation.cpp +++ b/gfx/gl/bufferedLocation.cpp @@ -25,7 +25,7 @@ BufferedLocation::position() const return loc.pos; } -Position3D +Rotation3D BufferedLocation::rotation() const { return loc.rot; @@ -41,7 +41,7 @@ BufferedLocation::setPosition(GlobalPosition3D p, bool update) } void -BufferedLocation::setRotation(Position3D r, bool update) +BufferedLocation::setRotation(Rotation3D r, bool update) { loc.rot = r; if (update) { diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp index 9f40998..d362b94 100644 --- a/gfx/gl/camera.cpp +++ b/gfx/gl/camera.cpp @@ -17,14 +17,14 @@ Ray Camera::unProject(const ScreenRelCoord & mouse) const { static constexpr const glm::vec4 screen {0, 0, 1, 1}; - const auto mouseProjection = glm::lookAt(::origin, forward, up); + const auto mouseProjection = glm::lookAt({}, forward, up); return {position, glm::normalize(glm::unProject(mouse || 1.F, mouseProjection, projection, screen))}; } void Camera::updateView() { - viewProjection = projection * glm::lookAt(origin, forward, up); + viewProjection = projection * glm::lookAt({}, forward, up); inverseViewProjection = glm::inverse(viewProjection); } diff --git a/gfx/gl/shadowMapper.cpp b/gfx/gl/shadowMapper.cpp index 6c8400e..1498bb0 100644 --- a/gfx/gl/shadowMapper.cpp +++ b/gfx/gl/shadowMapper.cpp @@ -130,7 +130,7 @@ ShadowMapper::update(const SceneProvider & scene, const Direction3D & dir, const glClear(GL_DEPTH_BUFFER_BIT); glCullFace(GL_FRONT); - const auto lightViewDir = glm::lookAt(origin, dir, up); + const auto lightViewDir = glm::lookAt({}, dir, up); const auto lightViewPoint = camera.getPosition(); const auto bandViewExtents = getBandViewExtents(camera, lightViewDir); |