From 5621fa1ab7806b40472e55c9b7d76e0e3d51c23b Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Thu, 20 Oct 2016 02:39:24 +0300 Subject: [PATCH] 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 --- include/cglm-cam.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/cglm-cam.h b/include/cglm-cam.h index dd92cad..415ae53 100644 --- a/include/cglm-cam.h +++ b/include/cglm-cam.h @@ -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); } }