initial commit

This commit is contained in:
MihailRis 2025-05-07 20:42:50 +03:00
parent 27b194816b
commit fc46b7c434
36 changed files with 755 additions and 71 deletions

View file

@ -31,9 +31,9 @@ glm::mat4 Camera::getProjection() const {
if (perspective) {
return glm::perspective(fov * zoom, ar, near, far);
} else if (flipped) {
return glm::ortho(0.0f, fov * ar, fov, 0.0f);
return glm::ortho(0.0f, fov * ar, fov, 0.0f, near, far);
} else {
return glm::ortho(0.0f, fov * ar, 0.0f, fov);
return glm::ortho(0.0f, fov * ar, 0.0f, fov, near, far);
}
}
@ -45,7 +45,8 @@ glm::mat4 Camera::getView(bool pos) const {
if (perspective) {
return glm::lookAt(camera_pos, camera_pos + front, up);
} else {
return glm::translate(glm::mat4(1.0f), camera_pos);
return glm::lookAt(camera_pos, camera_pos + front, up);
//return glm::translate(glm::mat4(1.0f), camera_pos);
}
}