Rename 'near' and 'far' variables to 'z_near' and 'z_far'

The Windows headers define near and far to be empty so it breaks the
build.
This commit is contained in:
Neil Roberts 2009-06-04 11:48:51 +01:00
parent b900c314b7
commit db4fb91fe3
2 changed files with 15 additions and 15 deletions

View File

@ -228,10 +228,10 @@ cogl_matrix_perspective (CoglMatrix *matrix,
* @right: The coordinate for the right clipping plane * @right: The coordinate for the right clipping plane
* @bottom: The coordinate for the bottom clipping plane * @bottom: The coordinate for the bottom clipping plane
* @top: The coordinate for the top clipping plane * @top: The coordinate for the top clipping plane
* @near: The coordinate for the near clipping plane (may be negative if * @z_near: The coordinate for the near clipping plane (may be negative if
* the plane is behind the viewer) * the plane is behind the viewer)
* @far: The coordinate for the far clipping plane (may be negative if * @z_far: The coordinate for the far clipping plane (may be negative if
* the plane is behind the viewer) * the plane is behind the viewer)
* *
* Multiples the matrix by a parallel projection matrix. * Multiples the matrix by a parallel projection matrix.
*/ */
@ -241,8 +241,8 @@ cogl_matrix_ortho (CoglMatrix *matrix,
float right, float right,
float bottom, float bottom,
float top, float top,
float near, float z_near,
float far); float z_far);
/** /**
* cogl_matrix_init_from_array: * cogl_matrix_init_from_array:

View File

@ -239,8 +239,8 @@ _cogl_current_matrix_ortho (float left,
float right, float right,
float bottom, float bottom,
float top, float top,
float near, float near_val,
float far) float far_val)
{ {
_COGL_GET_CONTEXT_AND_STACK (ctx, current_stack, NO_RETVAL); _COGL_GET_CONTEXT_AND_STACK (ctx, current_stack, NO_RETVAL);
@ -248,8 +248,8 @@ _cogl_current_matrix_ortho (float left,
_cogl_matrix_stack_ortho (current_stack, _cogl_matrix_stack_ortho (current_stack,
left, right, left, right,
bottom, top, bottom, top,
near, near_val,
far); far_val);
else else
{ {
#ifdef HAVE_COGL_GLES2 #ifdef HAVE_COGL_GLES2
@ -257,10 +257,10 @@ _cogl_current_matrix_ortho (float left,
CoglMatrix matrix; CoglMatrix matrix;
_cogl_get_matrix (ctx->matrix_mode, &matrix); _cogl_get_matrix (ctx->matrix_mode, &matrix);
cogl_matrix_ortho (&matrix, cogl_matrix_ortho (&matrix,
left, right, bottom, top, near, far); left, right, bottom, top, near_val, far_val);
_cogl_current_matrix_load (&matrix); _cogl_current_matrix_load (&matrix);
#else #else
GE (glOrtho (left, right, bottom, top, near, far)); GE (glOrtho (left, right, bottom, top, near_val, far_val));
#endif #endif
} }
} }
@ -453,14 +453,14 @@ cogl_ortho (float left,
float right, float right,
float bottom, float bottom,
float top, float top,
float near, float z_near,
float far) float z_far)
{ {
CoglMatrix ortho; CoglMatrix ortho;
_COGL_GET_CONTEXT (ctx, NO_RETVAL); _COGL_GET_CONTEXT (ctx, NO_RETVAL);
cogl_matrix_init_identity (&ortho); cogl_matrix_init_identity (&ortho);
cogl_matrix_ortho (&ortho, left, right, bottom, top, near, far); cogl_matrix_ortho (&ortho, left, right, bottom, top, z_near, z_far);
_cogl_set_current_matrix (COGL_MATRIX_PROJECTION); _cogl_set_current_matrix (COGL_MATRIX_PROJECTION);
_cogl_current_matrix_load (&ortho); _cogl_current_matrix_load (&ortho);