mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +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 * aspectRatio,
|
||||||
-1.0f,
|
-1.0f,
|
||||||
1.0f,
|
1.0f,
|
||||||
100.0f,
|
|
||||||
-100.0f,
|
-100.0f,
|
||||||
|
100.0f,
|
||||||
dest);
|
dest);
|
||||||
} else {
|
} else {
|
||||||
glm_ortho(-1.0f,
|
glm_ortho(-1.0f,
|
||||||
1.0f,
|
1.0f,
|
||||||
-1.0f / aspectRatio,
|
-1.0f / aspectRatio,
|
||||||
1.0f / aspectRatio,
|
1.0f / aspectRatio,
|
||||||
100.0f,
|
|
||||||
-100.0f,
|
-100.0f,
|
||||||
|
100.0f,
|
||||||
dest);
|
dest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,16 +97,16 @@ glm_ortho_default_s(float size, mat4 dest) {
|
|||||||
size * aspectRatio,
|
size * aspectRatio,
|
||||||
-size,
|
-size,
|
||||||
size,
|
size,
|
||||||
size + 100.0f,
|
|
||||||
-size - 100.0f,
|
-size - 100.0f,
|
||||||
|
size + 100.0f,
|
||||||
dest);
|
dest);
|
||||||
} else {
|
} else {
|
||||||
glm_ortho(-size,
|
glm_ortho(-size,
|
||||||
size,
|
size,
|
||||||
-size / aspectRatio,
|
-size / aspectRatio,
|
||||||
size / aspectRatio,
|
size / aspectRatio,
|
||||||
size + 100.0f,
|
|
||||||
-size - 100.0f,
|
-size - 100.0f,
|
||||||
|
size + 100.0f,
|
||||||
dest);
|
dest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user