initial commit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user