From 05dabd1aa5d03af64248ba2114a90f3ac984e938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Tue, 7 Jul 2009 20:02:25 +0200 Subject: [PATCH] Avoid near/far identifier names. Leads to conflict with system headers on Windows, where macros named "near" and "far" are defined. --- common/cogl-matrix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/cogl-matrix.c b/common/cogl-matrix.c index 1de2a6146..4cc635985 100644 --- a/common/cogl-matrix.c +++ b/common/cogl-matrix.c @@ -220,8 +220,8 @@ cogl_matrix_ortho (CoglMatrix *matrix, float right, float bottom, float top, - float near, - float far) + float near_val, + float far_val) { CoglMatrix ortho; @@ -240,13 +240,13 @@ cogl_matrix_ortho (CoglMatrix *matrix, /* column 2 */ ortho.xz = 0.0; ortho.yz = 0.0; - ortho.zz = -2.0 / (far - near); + ortho.zz = -2.0 / (far_val - near_val); ortho.wz = 0.0; /* column 3 */ ortho.xw = -(right + left) / (right - left); ortho.yw = -(top + bottom) / (top - bottom); - ortho.zw = -(far + near) / (far - near); + ortho.zw = -(far_val + near_val) / (far_val - near_val); ortho.ww = 1.0; cogl_matrix_multiply (matrix, matrix, &ortho);