Evas 3d: Fix compilation for Windows

near and far are #defined in windows.h. Old legacy stuff.
To be sure the code compiles, rename the variables.

Fixes T3423
This commit is contained in:
Jean-Philippe Andre 2016-04-08 10:38:15 +09:00
parent 0e5fee0041
commit f253f9a7bc
3 changed files with 11 additions and 11 deletions

View File

@ -1155,17 +1155,17 @@ _evas_canvas3d_mesh_convex_hull_data_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh
EOLIAN static void EOLIAN static void
_evas_canvas3d_mesh_lod_boundary_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, _evas_canvas3d_mesh_lod_boundary_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
Evas_Real near, Evas_Real far) Evas_Real near_lod, Evas_Real far_lod)
{ {
pd->near_lod_boundary = near; pd->near_lod_boundary = near_lod;
pd->far_lod_boundary = far; pd->far_lod_boundary = far_lod;
} }
EOLIAN static void EOLIAN static void
_evas_canvas3d_mesh_lod_boundary_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, _evas_canvas3d_mesh_lod_boundary_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
Evas_Real *near, Evas_Real *far) Evas_Real *near_lod, Evas_Real *far_lod)
{ {
*near = pd->near_lod_boundary; *near_lod = pd->near_lod_boundary;
*far = pd->far_lod_boundary; *far_lod = pd->far_lod_boundary;
} }
#include "canvas/evas_canvas3d_mesh.eo.c" #include "canvas/evas_canvas3d_mesh.eo.c"

View File

@ -415,8 +415,8 @@ class Evas.Canvas3D.Mesh (Evas.Canvas3D.Object, Evas.Common_Interface, Efl.File)
See also @Evas.Canvas3D.Mesh.lod_boundary.set.]] See also @Evas.Canvas3D.Mesh.lod_boundary.set.]]
} }
values { values {
near: Evas.Real; [[up boundary]] near_lod: Evas.Real; [[up boundary]]
far: Evas.Real; [[down boundary]] far_lod: Evas.Real; [[down boundary]]
} }
} }
} }

View File

@ -322,7 +322,7 @@ static void
matrix_ortho(GLfloat *m, matrix_ortho(GLfloat *m,
GLfloat l, GLfloat r, GLfloat l, GLfloat r,
GLfloat t, GLfloat b, GLfloat t, GLfloat b,
GLfloat near, GLfloat far, GLfloat near_, GLfloat far_,
int rot, int vw, int vh, int rot, int vw, int vh,
int foc, GLfloat orth) int foc, GLfloat orth)
{ {
@ -366,12 +366,12 @@ matrix_ortho(GLfloat *m,
m[8] = 0.0; m[8] = 0.0;
m[9] = 0.0; m[9] = 0.0;
m[10] = -(2.0 / (far - near)); m[10] = -(2.0 / (far_ - near_));
m[11] = 1.0 / (GLfloat)foc; m[11] = 1.0 / (GLfloat)foc;
m[12] = (m[0] * tx) + (m[4] * ty) - ((r + l) / (r - l)); m[12] = (m[0] * tx) + (m[4] * ty) - ((r + l) / (r - l));
m[13] = (m[1] * tx) + (m[5] * ty) - ((t + b) / (t - b)); m[13] = (m[1] * tx) + (m[5] * ty) - ((t + b) / (t - b));
m[14] = (m[2] * tx) + (m[6] * ty) - ((near + far) / (far - near)); m[14] = (m[2] * tx) + (m[6] * ty) - ((near_ + far_) / (far_ - near_));
m[15] = (m[3] * tx) + (m[7] * ty) + orth; m[15] = (m[3] * tx) + (m[7] * ty) + orth;
} }