don't use near, far variable names, that is in conflict with msvc7 obsoleted keywords

This commit is contained in:
Pawel Kolodziejski 2006-02-12 15:25:17 +00:00
parent 7b02162b4e
commit 39bfb25987
3 changed files with 8 additions and 8 deletions

View file

@ -352,7 +352,7 @@ void tglViewport(int x,int y,int width,int height)
} }
void tglFrustum(double left,double right,double bottom,double top, void tglFrustum(double left,double right,double bottom,double top,
double near,double farv) double nearv,double farv)
{ {
TGLParam p[7]; TGLParam p[7];
@ -361,7 +361,7 @@ void tglFrustum(double left,double right,double bottom,double top,
p[2].f=(float)right; p[2].f=(float)right;
p[3].f=(float)bottom; p[3].f=(float)bottom;
p[4].f=(float)top; p[4].f=(float)top;
p[5].f=(float)near; p[5].f=(float)nearv;
p[6].f=(float)farv; p[6].f=(float)farv;
gl_add_op(p); gl_add_op(p);

View file

@ -733,7 +733,7 @@ void tglScalef(float x,float y,float z);
void tglViewport(int x,int y,int width,int height); void tglViewport(int x,int y,int width,int height);
void tglFrustum(double left,double right,double bottom,double top, void tglFrustum(double left,double right,double bottom,double top,
double near,double far); double nearv,double farv);
/* lists */ /* lists */
unsigned int tglGenLists(int range); unsigned int tglGenLists(int range);

View file

@ -217,16 +217,16 @@ void glopFrustum(GLContext *c,TGLParam *p)
float right=p[2].f; float right=p[2].f;
float bottom=p[3].f; float bottom=p[3].f;
float top=p[4].f; float top=p[4].f;
float near=p[5].f; float nearp=p[5].f;
float farp=p[6].f; float farp=p[6].f;
float x,y,A,B,C,D; float x,y,A,B,C,D;
x = (float)((2.0*near) / (right-left)); x = (float)((2.0*nearp) / (right-left));
y = (float)((2.0*near) / (top-bottom)); y = (float)((2.0*nearp) / (top-bottom));
A = (right+left) / (right-left); A = (right+left) / (right-left);
B = (top+bottom) / (top-bottom); B = (top+bottom) / (top-bottom);
C = -(farp+near) / ( farp-near); C = -(farp+nearp) / ( farp-nearp);
D = (float)(-(2.0*farp*near) / (farp-near)); D = (float)(-(2.0*farp*nearp) / (farp-nearp));
r=&m.m[0][0]; r=&m.m[0][0];
r[0]= x; r[1]=0; r[2]=A; r[3]=0; r[0]= x; r[1]=0; r[2]=A; r[3]=0;