mirror of
https://github.com/recp/cglm.git
synced 2025-12-30 20:27:00 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user