]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix div0's GL_BuildOrtho which break compilation on Windows
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Apr 2008 17:48:33 +0000 (17:48 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Apr 2008 17:48:33 +0000 (17:48 +0000)
(near and far are keywords, not variable names)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8243 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c

index b6425f707ad963e379fa1ea9658e4ea9cc062b1d..92306591c3863f5ac645dc86b1dafcdf7e6a4f8c 100644 (file)
@@ -309,12 +309,12 @@ static void GL_BuildFrustum(double m[16], double left, double right, double bott
        m[1]  = 0;
        m[2]  = 0;
        m[3]  = 0;
-         
+
        m[4]  = 0;
        m[5]  = 2 * nearVal / (top - bottom);
        m[6]  = 0;
        m[7]  = 0;
-         
+
        m[8]  = (right + left) / (right - left);
        m[9]  = (top + bottom) / (top - bottom);
        m[10] = - (farVal + nearVal) / (farVal - nearVal);
@@ -384,26 +384,26 @@ void GL_SetupView_Mode_PerspectiveInfiniteFarClip (double frustumx, double frust
        Matrix4x4_FromArrayDoubleGL(&backend_projectmatrix, m);
 }
 
-static void GL_BuildOrtho(double m[16], double left, double right, double bottom, double top, double near, double far)
+static void GL_BuildOrtho(double m[16], double left, double right, double bottom, double top, double zNear, double zFar)
 {
        m[0]  = 2/(right - left);
        m[1]  = 0;
        m[2]  = 0;
        m[3]  = 0;
-         
+
        m[4]  = 0;
        m[5]  = 2/(top - bottom);
        m[6]  = 0;
        m[7]  = 0;
-         
+
        m[8]  = 0;
        m[9]  = 0;
-       m[10] = -2/(far - near);
+       m[10] = -2/(zFar - zNear);
        m[11] = 0;
 
        m[12] = - (right + left)/(right - left);
        m[13] = - (top + bottom)/(top - bottom);
-       m[14] = - (far + near)/(far - near);
+       m[14] = - (zFar + zNear)/(zFar - zNear);
        m[15] = 1;
 }