Compare commits

..

1 Commits
v0.2 ... master

1 changed files with 2 additions and 1 deletions

View File

@ -129,7 +129,8 @@ void Camera::setPerspective(float fovy, float aspect)
// Устанавливает заданную ортографическую матрицу // Устанавливает заданную ортографическую матрицу
void Camera::setOrtho(float width, float height) void Camera::setOrtho(float width, float height)
{ {
projection = glm::ortho(0.0f, width, 0.0f, height, CAMERA_NEAR, CAMERA_FAR); const float aspect = width / height;
projection = glm::ortho(-1.0f, 1.0f, -1.0f/aspect, 1.0f/aspect, CAMERA_NEAR, CAMERA_FAR);
requiredRecalcVP = true; requiredRecalcVP = true;
} }