aboutsummaryrefslogtreecommitdiff
path: root/source/Camera.cpp
diff options
context:
space:
mode:
authorhnOsmium0001 <[email protected]>2022-05-08 00:55:04 -0700
committerhnOsmium0001 <[email protected]>2022-05-08 00:55:04 -0700
commit184f7b71518d26bd4f948d6ef070d8863b430a78 (patch)
treedcb151cba7192fc5825c88044204398203a94db1 /source/Camera.cpp
parent37baa006649c6ddac40207e3fdc1599407179a76 (diff)
Fix performing translation in multiple places
- Camera: project matrix shouldn't need to handle eye position - SimpleGeometryObject: mesh coordinates should be local
Diffstat (limited to 'source/Camera.cpp')
-rw-r--r--source/Camera.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/Camera.cpp b/source/Camera.cpp
index c634ded..4c1f881 100644
--- a/source/Camera.cpp
+++ b/source/Camera.cpp
@@ -40,10 +40,6 @@ glm::mat4 Camera::CalcProjectionMatrix() const {
} else {
float widthMeters = AppConfig::mainWindowWidth / pixelsPerMeter;
float heightMeters = AppConfig::mainWindowHeight / pixelsPerMeter;
- return glm::ortho(
- eye.x - widthMeters / 2,
- eye.x + widthMeters / 2,
- eye.y - heightMeters / 2,
- eye.y + heightMeters / 2);
+ return glm::ortho(-widthMeters / 2, +widthMeters / 2, -heightMeters / 2, +heightMeters / 2);
}
}