Compare commits
No commits in common. "master" and "v0.2" have entirely different histories.
|
@ -129,8 +129,7 @@ void Camera::setPerspective(float fovy, float aspect)
|
||||||
// Устанавливает заданную ортографическую матрицу
|
// Устанавливает заданную ортографическую матрицу
|
||||||
void Camera::setOrtho(float width, float height)
|
void Camera::setOrtho(float width, float height)
|
||||||
{
|
{
|
||||||
const float aspect = width / height;
|
projection = glm::ortho(0.0f, width, 0.0f, height, CAMERA_NEAR, CAMERA_FAR);
|
||||||
projection = glm::ortho(-1.0f, 1.0f, -1.0f/aspect, 1.0f/aspect, CAMERA_NEAR, CAMERA_FAR);
|
|
||||||
requiredRecalcVP = true;
|
requiredRecalcVP = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue