fix ortho

nearVal, farVal
Specify the distances to the nearer and farther depth clipping planes.
****These values are negative if the plane is to be behind the
viewer.***

https://www.opengl.org/sdk/docs/man2/xhtml/glOrtho.xml
This commit is contained in:
Recep Aslantas
2016-10-20 02:39:24 +03:00
parent f4b0d2bdde
commit 5621fa1ab7

View File

@@ -69,16 +69,16 @@ glm_ortho_default(mat4 dest) {
1.0f * aspectRatio,
-1.0f,
1.0f,
100.0f,
-100.0f,
100.0f,
dest);
} else {
glm_ortho(-1.0f,
1.0f,
-1.0f / aspectRatio,
1.0f / aspectRatio,
100.0f,
-100.0f,
100.0f,
dest);
}
}
@@ -97,16 +97,16 @@ glm_ortho_default_s(float size, mat4 dest) {
size * aspectRatio,
-size,
size,
size + 100.0f,
-size - 100.0f,
size + 100.0f,
dest);
} else {
glm_ortho(-size,
size,
-size / aspectRatio,
size / aspectRatio,
size + 100.0f,
-size - 100.0f,
size + 100.0f,
dest);
}
}