[Scummvm-cvs-logs] CVS: residual/tinygl api.cpp,1.2,1.3 arrays.cpp,1.2,1.3 clear.cpp,1.2,1.3 clip.cpp,1.2,1.3 get.cpp,1.2,1.3 gl.h,1.2,1.3 init.cpp,1.2,1.3 light.cpp,1.2,1.3 list.cpp,1.2,1.3 matrix.cpp,1.2,1.3 misc.cpp,1.2,1.3 select.cpp,1.2,1.3 texture.cpp,1.2,1.3 vertex.cpp,1.2,1.3 zgl.h,1.2,1.3

Pawel Kolodziejski aquadran at users.sourceforge.net
Wed Jan 12 10:02:06 CET 2005


Update of /cvsroot/scummvm/residual/tinygl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21075

Modified Files:
	api.cpp arrays.cpp clear.cpp clip.cpp get.cpp gl.h init.cpp 
	light.cpp list.cpp matrix.cpp misc.cpp select.cpp texture.cpp 
	vertex.cpp zgl.h 
Log Message:
added t/T prefix to prevent opengl names duplication

Index: api.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/api.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- api.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ api.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -2,9 +2,9 @@
 #include <stdio.h>
 /* glVertex */
 
-void glVertex4f(float x,float y,float z,float w)
+void tglVertex4f(float x,float y,float z,float w)
 {
-  GLParam p[5];
+  TGLParam p[5];
 
   p[0].op=OP_Vertex;
   p[1].f=x;
@@ -15,26 +15,26 @@
   gl_add_op(p);
 }
 
-void glVertex2f(float x,float y) 
+void tglVertex2f(float x,float y) 
 {
-  glVertex4f(x,y,0,1);
+  tglVertex4f(x,y,0,1);
 }
 
-void glVertex3f(float x,float y,float z) 
+void tglVertex3f(float x,float y,float z) 
 {
-  glVertex4f(x,y,z,1);
+  tglVertex4f(x,y,z,1);
 }
 
-void glVertex3fv(float *v) 
+void tglVertex3fv(float *v) 
 {
-  glVertex4f(v[0],v[1],v[2],1);
+  tglVertex4f(v[0],v[1],v[2],1);
 }
 
 /* glNormal */
 
-void glNormal3f(float x,float y,float z)
+void tglNormal3f(float x,float y,float z)
 {
-  GLParam p[4];
+  TGLParam p[4];
 
   p[0].op=OP_Normal;
   p[1].f=x;
@@ -44,16 +44,16 @@
   gl_add_op(p);
 }
 
-void glNormal3fv(float *v) 
+void tglNormal3fv(float *v) 
 {
-  glNormal3f(v[0],v[1],v[2]);
+  tglNormal3f(v[0],v[1],v[2]);
 }
 
 /* glColor */
 
-void glColor4f(float r,float g,float b,float a)
+void tglColor4f(float r,float g,float b,float a)
 {
-  GLParam p[8];
+  TGLParam p[8];
 
   p[0].op=OP_Color;
   p[1].f=r;
@@ -70,9 +70,9 @@
   gl_add_op(p);
 }
 
-void glColor4fv(float *v)
+void tglColor4fv(float *v)
 {
-  GLParam p[8];
+  TGLParam p[8];
 
   p[0].op=OP_Color;
   p[1].f=v[0];
@@ -89,22 +89,22 @@
   gl_add_op(p);
 }
 
-void glColor3f(float x,float y,float z) 
+void tglColor3f(float x,float y,float z) 
 {
-  glColor4f(x,y,z,1);
+  tglColor4f(x,y,z,1);
 }
 
 void glColor3fv(float *v) 
 {
-  glColor4f(v[0],v[1],v[2],1);
+  tglColor4f(v[0],v[1],v[2],1);
 }
 
 
 /* TexCoord */
 
-void glTexCoord4f(float s,float t,float r,float q)
+void tglTexCoord4f(float s,float t,float r,float q)
 {
-  GLParam p[5];
+  TGLParam p[5];
 
   p[0].op=OP_TexCoord;
   p[1].f=s;
@@ -115,19 +115,19 @@
   gl_add_op(p);
 }
 
-void glTexCoord2f(float s,float t)
+void tglTexCoord2f(float s,float t)
 {
-  glTexCoord4f(s,t,0,1);
+  tglTexCoord4f(s,t,0,1);
 }
 
-void glTexCoord2fv(float *v)
+void tglTexCoord2fv(float *v)
 {
-  glTexCoord4f(v[0],v[1],0,1);
+  tglTexCoord4f(v[0],v[1],0,1);
 }
 
-void glEdgeFlag(int flag)
+void tglEdgeFlag(int flag)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
   p[0].op=OP_EdgeFlag;
   p[1].i=flag;
@@ -137,11 +137,11 @@
 
 /* misc */
 
-void glShadeModel(int mode)
+void tglShadeModel(int mode)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
-  assert(mode == GL_FLAT || mode == GL_SMOOTH);
+  assert(mode == TGL_FLAT || mode == TGL_SMOOTH);
 
   p[0].op=OP_ShadeModel;
   p[1].i=mode;
@@ -149,13 +149,13 @@
   gl_add_op(p);
 }
 
-void glCullFace(int mode)
+void tglCullFace(int mode)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
-  assert(mode == GL_BACK || 
-         mode == GL_FRONT || 
-         mode == GL_FRONT_AND_BACK);
+  assert(mode == TGL_BACK || 
+         mode == TGL_FRONT || 
+         mode == TGL_FRONT_AND_BACK);
 
   p[0].op=OP_CullFace;
   p[1].i=mode;
@@ -163,13 +163,13 @@
   gl_add_op(p);
 }
 
-void glFrontFace(int mode)
+void tglFrontFace(int mode)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
-  assert(mode == GL_CCW || mode == GL_CW);
+  assert(mode == TGL_CCW || mode == TGL_CW);
 
-  mode = (mode != GL_CCW);
+  mode = (mode != TGL_CCW);
 
   p[0].op=OP_FrontFace;
   p[1].i=mode;
@@ -177,14 +177,14 @@
   gl_add_op(p);
 }
 
-void glPolygonMode(int face,int mode)
+void tglPolygonMode(int face,int mode)
 {
-  GLParam p[3];
+  TGLParam p[3];
 
-  assert(face == GL_BACK || 
-         face == GL_FRONT || 
-         face == GL_FRONT_AND_BACK);
-  assert(mode == GL_POINT || mode == GL_LINE || mode==GL_FILL);
+  assert(face == TGL_BACK || 
+         face == TGL_FRONT || 
+         face == TGL_FRONT_AND_BACK);
+  assert(mode == TGL_POINT || mode == TGL_LINE || mode==TGL_FILL);
 
   p[0].op=OP_PolygonMode;
   p[1].i=face;
@@ -196,9 +196,9 @@
 
 /* glEnable / glDisable */
 
-void glEnable(int cap)
+void tglEnable(int cap)
 {
-  GLParam p[3];
+  TGLParam p[3];
 
   p[0].op=OP_EnableDisable;
   p[1].i=cap;
@@ -207,9 +207,9 @@
   gl_add_op(p);
 }
 
-void glDisable(int cap)
+void tglDisable(int cap)
 {
-  GLParam p[3];
+  TGLParam p[3];
 
   p[0].op=OP_EnableDisable;
   p[1].i=cap;
@@ -220,9 +220,9 @@
 
 /* glBegin / glEnd */
 
-void glBegin(int mode)
+void tglBegin(int mode)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
   p[0].op=OP_Begin;
   p[1].i=mode;
@@ -230,9 +230,9 @@
   gl_add_op(p);
 }
 
-void glEnd(void)
+void tglEnd(void)
 {
-  GLParam p[1];
+  TGLParam p[1];
 
   p[0].op=OP_End;
 
@@ -241,9 +241,9 @@
 
 /* matrix */
 
-void glMatrixMode(int mode)
+void tglMatrixMode(int mode)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
   p[0].op=OP_MatrixMode;
   p[1].i=mode;
@@ -251,9 +251,9 @@
   gl_add_op(p);
 }
 
-void glLoadMatrixf(const float *m)
+void tglLoadMatrixf(const float *m)
 {
-  GLParam p[17];
+  TGLParam p[17];
   int i;
 
   p[0].op=OP_LoadMatrix;
@@ -262,18 +262,18 @@
   gl_add_op(p);
 }
 
-void glLoadIdentity(void)
+void tglLoadIdentity(void)
 {
-  GLParam p[1];
+  TGLParam p[1];
 
   p[0].op=OP_LoadIdentity;
 
   gl_add_op(p);
 }
 
-void glMultMatrixf(const float *m)
+void tglMultMatrixf(const float *m)
 {
-  GLParam p[17];
+  TGLParam p[17];
   int i;
 
   p[0].op=OP_MultMatrix;
@@ -282,27 +282,27 @@
   gl_add_op(p);
 }
 
-void glPushMatrix(void)
+void tglPushMatrix(void)
 {
-  GLParam p[1];
+  TGLParam p[1];
 
   p[0].op=OP_PushMatrix;
 
   gl_add_op(p);
 }
 
-void glPopMatrix(void)
+void tglPopMatrix(void)
 {
-  GLParam p[1];
+  TGLParam p[1];
 
   p[0].op=OP_PopMatrix;
 
   gl_add_op(p);
 }
 
-void glRotatef(float angle,float x,float y,float z)
+void tglRotatef(float angle,float x,float y,float z)
 {
-  GLParam p[5];
+  TGLParam p[5];
 
   p[0].op=OP_Rotate;
   p[1].f=angle;
@@ -313,9 +313,9 @@
   gl_add_op(p);
 }
 
-void glTranslatef(float x,float y,float z)
+void tglTranslatef(float x,float y,float z)
 {
-  GLParam p[4];
+  TGLParam p[4];
 
   p[0].op=OP_Translate;
   p[1].f=x;
@@ -325,9 +325,9 @@
   gl_add_op(p);
 }
 
-void glScalef(float x,float y,float z)
+void tglScalef(float x,float y,float z)
 {
-  GLParam p[4];
+  TGLParam p[4];
 
   p[0].op=OP_Scale;
   p[1].f=x;
@@ -338,9 +338,9 @@
 }
 
 
-void glViewport(int x,int y,int width,int height)
+void tglViewport(int x,int y,int width,int height)
 {
-  GLParam p[5];
+  TGLParam p[5];
 
   p[0].op=OP_Viewport;
   p[1].i=x;
@@ -351,10 +351,10 @@
   gl_add_op(p);
 }
 
-void glFrustum(double left,double right,double bottom,double top,
+void tglFrustum(double left,double right,double bottom,double top,
                double near,double farv)
 {
-  GLParam p[7];
+  TGLParam p[7];
 
   p[0].op=OP_Frustum;
   p[1].f=left;
@@ -369,27 +369,27 @@
 
 /* lightening */
 
-void glMaterialfv(int mode,int type,float *v)
+void tglMaterialfv(int mode,int type,float *v)
 {
-  GLParam p[7];
+  TGLParam p[7];
   int i,n;
 
-  assert(mode == GL_FRONT  || mode == GL_BACK || mode==GL_FRONT_AND_BACK);
+  assert(mode == TGL_FRONT  || mode == TGL_BACK || mode==TGL_FRONT_AND_BACK);
 
   p[0].op=OP_Material;
   p[1].i=mode;
   p[2].i=type;
   n=4;
-  if (type == GL_SHININESS) n=1;
+  if (type == TGL_SHININESS) n=1;
   for(i=0;i<4;i++) p[3+i].f=v[i];
   for(i=n;i<4;i++) p[3+i].f=0;
 
   gl_add_op(p);
 }
 
-void glMaterialf(int mode,int type,float v)
+void tglMaterialf(int mode,int type,float v)
 {
-  GLParam p[7];
+  TGLParam p[7];
   int i;
 
   p[0].op=OP_Material;
@@ -401,9 +401,9 @@
   gl_add_op(p);
 }
 
-void glColorMaterial(int mode,int type)
+void tglColorMaterial(int mode,int type)
 {
-  GLParam p[3];
+  TGLParam p[3];
 
   p[0].op=OP_ColorMaterial;
   p[1].i=mode;
@@ -412,9 +412,9 @@
   gl_add_op(p);
 }
 
-void glLightfv(int light,int type,float *v)
+void tglLightfv(int light,int type,float *v)
 {
-  GLParam p[7];
+  TGLParam p[7];
   int i;
 
   p[0].op=OP_Light;
@@ -427,9 +427,9 @@
 }
 
 
-void glLightf(int light,int type,float v)
+void tglLightf(int light,int type,float v)
 {
-  GLParam p[7];
+  TGLParam p[7];
   int i;
 
   p[0].op=OP_Light;
@@ -441,9 +441,9 @@
   gl_add_op(p);
 }
 
-void glLightModeli(int pname,int param)
+void tglLightModeli(int pname,int param)
 {
-  GLParam p[6];
+  TGLParam p[6];
   int i;
 
   p[0].op=OP_LightModel;
@@ -454,9 +454,9 @@
   gl_add_op(p);
 }
 
-void glLightModelfv(int pname,float *param)
+void tglLightModelfv(int pname,float *param)
 {
-  GLParam p[6];
+  TGLParam p[6];
   int i;
 
   p[0].op=OP_LightModel;
@@ -468,9 +468,9 @@
 
 /* clear */
 
-void glClear(int mask)
+void tglClear(int mask)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
   p[0].op=OP_Clear;
   p[1].i=mask;
@@ -478,9 +478,9 @@
   gl_add_op(p);
 }
 
-void glClearColor(float r,float g,float b,float a)
+void tglClearColor(float r,float g,float b,float a)
 {
-  GLParam p[5];
+  TGLParam p[5];
 
   p[0].op=OP_ClearColor;
   p[1].f=r;
@@ -491,9 +491,9 @@
   gl_add_op(p);
 }
 
-void glClearDepth(double depth)
+void tglClearDepth(double depth)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
   p[0].op=OP_ClearDepth;
   p[1].f=depth;
@@ -504,11 +504,11 @@
 
 /* textures */
 
-void glTexImage2D( int target, int level, int components,
+void tglTexImage2D( int target, int level, int components,
                    int width, int height, int border,
                    int format, int type, void *pixels)
 {
-  GLParam p[10];
+  TGLParam p[10];
 
   p[0].op=OP_TexImage2D;
   p[1].i=target;
@@ -525,9 +525,9 @@
 }
 
 
-void glBindTexture(int target,int texture)
+void tglBindTexture(int target,int texture)
 {
-  GLParam p[3];
+  TGLParam p[3];
 
   p[0].op=OP_BindTexture;
   p[1].i=target;
@@ -536,9 +536,9 @@
   gl_add_op(p);
 }
 
-void glTexEnvi(int target,int pname,int param)
+void tglTexEnvi(int target,int pname,int param)
 {
-  GLParam p[8];
+  TGLParam p[8];
   
   p[0].op=OP_TexEnv;
   p[1].i=target;
@@ -552,9 +552,9 @@
   gl_add_op(p);
 }
 
-void glTexParameteri(int target,int pname,int param)
+void tglTexParameteri(int target,int pname,int param)
 {
-  GLParam p[8];
+  TGLParam p[8];
   
   p[0].op=OP_TexParameter;
   p[1].i=target;
@@ -568,9 +568,9 @@
   gl_add_op(p);
 }
 
-void glPixelStorei(int pname,int param)
+void tglPixelStorei(int pname,int param)
 {
-  GLParam p[3];
+  TGLParam p[3];
 
   p[0].op=OP_PixelStore;
   p[1].i=pname;
@@ -581,18 +581,18 @@
 
 /* selection */
 
-void glInitNames(void)
+void tglInitNames(void)
 {
-  GLParam p[1];
+  TGLParam p[1];
 
   p[0].op=OP_InitNames;
 
   gl_add_op(p);
 }
 
-void glPushName(unsigned int name)
+void tglPushName(unsigned int name)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
   p[0].op=OP_PushName;
   p[1].i=name;
@@ -600,18 +600,18 @@
   gl_add_op(p);
 }
 
-void glPopName(void)
+void tglPopName(void)
 {
-  GLParam p[1];
+  TGLParam p[1];
 
   p[0].op=OP_PopName;
 
   gl_add_op(p);
 }
 
-void glLoadName(unsigned int name)
+void tglLoadName(unsigned int name)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
   p[0].op=OP_LoadName;
   p[1].i=name;
@@ -620,9 +620,9 @@
 }
 
 void 
-glPolygonOffset(GLfloat factor, GLfloat units)
+tglPolygonOffset(TGLfloat factor, TGLfloat units)
 {
-  GLParam p[3];
+  TGLParam p[3];
   p[0].op = OP_PolygonOffset;
   p[1].f = factor;
   p[2].f = units;
@@ -630,9 +630,9 @@
 
 /* Special Functions */
 
-void glCallList(unsigned int list)
+void tglCallList(unsigned int list)
 {
-  GLParam p[2];
+  TGLParam p[2];
 
   p[0].op=OP_CallList;
   p[1].i=list;
@@ -640,14 +640,14 @@
   gl_add_op(p);
 }
 
-void glFlush(void)
+void tglFlush(void)
 {
   /* nothing to do */
 }
 
-void glHint(int target,int mode)
+void tglHint(int target,int mode)
 {
-  GLParam p[3];
+  TGLParam p[3];
 
   p[0].op=OP_Hint;
   p[1].i=target;
@@ -658,7 +658,7 @@
 
 /* Non standard functions */
 
-void glDebug(int mode)
+void tglDebug(int mode)
 {
   GLContext *c=gl_get_context();
   c->print_flag=mode;

Index: arrays.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/arrays.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- arrays.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ arrays.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -8,14 +8,14 @@
 #define TEXCOORD_ARRAY 0x0008
 
 void
-glopArrayElement(GLContext *c, GLParam *param)
+glopArrayElement(GLContext *c, TGLParam *param)
 {
   int i;
   int states = c->client_states;
   int idx = param[1].i;
     
   if (states & COLOR_ARRAY) {
-    GLParam p[5];
+    TGLParam p[5];
     int size = c->color_array_size; 
     i = idx * (size + c->color_array_stride);
     p[1].f = c->color_array[i];
@@ -40,7 +40,7 @@
     c->current_tex_coord.W = size > 3 ? c->texcoord_array[i+3] : 1.0f;
   }
   if (states & VERTEX_ARRAY) {
-    GLParam p[5];
+    TGLParam p[5];
     int size = c->vertex_array_size;
     i = idx * (size + c->vertex_array_stride);
     p[1].f = c->vertex_array[i];
@@ -52,9 +52,9 @@
 }
 
 void
-glArrayElement(GLint i)
+glArrayElement(TGLint i)
 {
-  GLParam p[2];
+  TGLParam p[2];
   p[0].op = OP_ArrayElement;
   p[1].i = i;
   gl_add_op(p);
@@ -62,28 +62,28 @@
 
 
 void
-glopEnableClientState(GLContext *c, GLParam *p)
+glopEnableClientState(GLContext *c, TGLParam *p)
 {
   c->client_states |= p[1].i;
 }
 
 void 
-glEnableClientState(GLenum array)
+glEnableClientState(TGLenum array)
 {
-  GLParam p[2];
+  TGLParam p[2];
   p[0].op = OP_EnableClientState;
   
   switch(array) {
-  case GL_VERTEX_ARRAY:
+  case TGL_VERTEX_ARRAY:
     p[1].i = VERTEX_ARRAY;
     break;  
-  case GL_NORMAL_ARRAY:
+  case TGL_NORMAL_ARRAY:
     p[1].i = NORMAL_ARRAY;
     break;
-  case GL_COLOR_ARRAY:
+  case TGL_COLOR_ARRAY:
     p[1].i = COLOR_ARRAY;
     break;
-  case GL_TEXTURE_COORD_ARRAY:
+  case TGL_TEXTURE_COORD_ARRAY:
     p[1].i = TEXCOORD_ARRAY;
     break;
   default:
@@ -94,28 +94,28 @@
 }
 
 void
-glopDisableClientState(GLContext *c, GLParam *p)
+glopDisableClientState(GLContext *c, TGLParam *p)
 {
   c->client_states &= p[1].i;
 }
 
 void
-glDisableClientState(GLenum array)
+glDisableClientState(TGLenum array)
 {
-  GLParam p[2];
+  TGLParam p[2];
   p[0].op = OP_DisableClientState;
     
   switch(array) {
-  case GL_VERTEX_ARRAY:
+  case TGL_VERTEX_ARRAY:
     p[1].i = ~VERTEX_ARRAY;
     break;  
-  case GL_NORMAL_ARRAY:
+  case TGL_NORMAL_ARRAY:
     p[1].i = ~NORMAL_ARRAY;
     break;
-  case GL_COLOR_ARRAY:
+  case TGL_COLOR_ARRAY:
     p[1].i = ~COLOR_ARRAY;
     break;
-  case GL_TEXTURE_COORD_ARRAY:
+  case TGL_TEXTURE_COORD_ARRAY:
     p[1].i = ~TEXCOORD_ARRAY;
     break;
   default:
@@ -126,7 +126,7 @@
 }
 
 void
-glopVertexPointer(GLContext *c, GLParam *p)
+glopVertexPointer(GLContext *c, TGLParam *p)
 {
   c->vertex_array_size = p[1].i;
   c->vertex_array_stride = p[2].i;
@@ -134,11 +134,11 @@
 }
 
 void 
-glVertexPointer(GLint size, GLenum type, GLsizei stride, 
-                const GLvoid *pointer)
+glVertexPointer(TGLint size, TGLenum type, TGLsizei stride, 
+                const TGLvoid *pointer)
 {
-  GLParam p[4];
-  assert(type == GL_FLOAT);
+  TGLParam p[4];
+  assert(type == TGL_FLOAT);
   p[0].op = OP_VertexPointer;
   p[1].i = size;
   p[2].i = stride;
@@ -147,7 +147,7 @@
 }
 
 void
-glopColorPointer(GLContext *c, GLParam *p)
+glopColorPointer(GLContext *c, TGLParam *p)
 {
   c->color_array_size = p[1].i;
   c->color_array_stride = p[2].i;
@@ -155,11 +155,11 @@
 }
 
 void 
-glColorPointer(GLint size, GLenum type, GLsizei stride, 
-               const GLvoid *pointer)
+glColorPointer(TGLint size, TGLenum type, TGLsizei stride, 
+               const TGLvoid *pointer)
 {
-  GLParam p[4];
-  assert(type == GL_FLOAT);
+  TGLParam p[4];
+  assert(type == TGL_FLOAT);
   p[0].op = OP_ColorPointer;
   p[1].i = size;
   p[2].i = stride;
@@ -168,25 +168,25 @@
 }
 
 void
-glopNormalPointer(GLContext *c, GLParam *p)
+glopNormalPointer(GLContext *c, TGLParam *p)
 {
   c->normal_array_stride = p[1].i;
   c->normal_array = (float *)p[2].p;  
 }
 
 void 
-glNormalPointer(GLenum type, GLsizei stride, 
-                const GLvoid *pointer)
+glNormalPointer(TGLenum type, TGLsizei stride, 
+                const TGLvoid *pointer)
 {
-  GLParam p[3];
-  assert(type == GL_FLOAT);
+  TGLParam p[3];
+  assert(type == TGL_FLOAT);
   p[0].op = OP_NormalPointer;
   p[1].i = stride;
   p[2].p = (void*)pointer;
 }
 
 void
-glopTexCoordPointer(GLContext *c, GLParam *p)
+glopTexCoordPointer(GLContext *c, TGLParam *p)
 {
   c->texcoord_array_size = p[1].i;
   c->texcoord_array_stride = p[2].i;
@@ -194,11 +194,11 @@
 }
 
 void 
-glTexCoordPointer(GLint size, GLenum type, GLsizei stride, 
-                  const GLvoid *pointer)
+glTexCoordPointer(TGLint size, TGLenum type, TGLsizei stride, 
+                  const TGLvoid *pointer)
 {
-  GLParam p[4];
-  assert(type == GL_FLOAT);
+  TGLParam p[4];
+  assert(type == TGL_FLOAT);
   p[0].op = OP_TexCoordPointer;
   p[1].i = size;
   p[2].i = stride;

Index: clear.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/clear.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- clear.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ clear.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -1,20 +1,20 @@
 #include "tinygl/zgl.h"
 
 
-void glopClearColor(GLContext *c,GLParam *p)
+void glopClearColor(GLContext *c,TGLParam *p)
 {
   c->clear_color.v[0]=p[1].f;
   c->clear_color.v[1]=p[2].f;
   c->clear_color.v[2]=p[3].f;
   c->clear_color.v[3]=p[4].f;
 }
-void glopClearDepth(GLContext *c,GLParam *p)
+void glopClearDepth(GLContext *c,TGLParam *p)
 {
   c->clear_depth=p[1].f;
 }
 
 
-void glopClear(GLContext *c,GLParam *p)
+void glopClear(GLContext *c,TGLParam *p)
 {
   int mask=p[1].i;
   int z=0;
@@ -24,7 +24,7 @@
 
   /* TODO : correct value of Z */
 
-  ZB_clear(c->zb,mask & GL_DEPTH_BUFFER_BIT,z,
-	   mask & GL_COLOR_BUFFER_BIT,r,g,b);
+  ZB_clear(c->zb,mask & TGL_DEPTH_BUFFER_BIT,z,
+	   mask & TGL_COLOR_BUFFER_BIT,r,g,b);
 }
 

Index: clip.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/clip.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- clip.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ clip.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -65,7 +65,7 @@
 void gl_draw_point(GLContext *c,GLVertex *p0)
 {
   if (p0->clip_code == 0) {
-    if (c->render_mode == GL_SELECT) {
+    if (c->render_mode == TGL_SELECT) {
       gl_add_select(c,p0->zp.z,p0->zp.z);
     } else {
       ZB_plot(c->zb,&p0->zp);
@@ -120,7 +120,7 @@
   cc2=p2->clip_code;
 
   if ( (cc1 | cc2) == 0) {
-    if (c->render_mode == GL_SELECT) {
+    if (c->render_mode == TGL_SELECT) {
       gl_add_select1(c,p1->zp.z,p2->zp.z,p2->zp.z);
     } else {
         if (c->depth_test)
@@ -215,7 +215,7 @@
 static inline void updateTmp(GLContext *c,
 			     GLVertex *q,GLVertex *p0,GLVertex *p1,float t)
 {
-  if (c->current_shade_model == GL_SMOOTH) {
+  if (c->current_shade_model == TGL_SMOOTH) {
     q->color.v[0]=p0->color.v[0] + (p1->color.v[0]-p0->color.v[0])*t;
     q->color.v[1]=p0->color.v[1] + (p1->color.v[1]-p0->color.v[1])*t;
     q->color.v[2]=p0->color.v[2] + (p1->color.v[2]-p0->color.v[2])*t;
@@ -264,10 +264,10 @@
       /* back face culling */
       if (c->cull_face_enabled) {
         /* most used case first */
-        if (c->current_cull_face == GL_BACK) {
+        if (c->current_cull_face == TGL_BACK) {
           if (front == 0) return;
           c->draw_triangle_front(c,p0,p1,p2);
-        } else if (c->current_cull_face == GL_FRONT) {
+        } else if (c->current_cull_face == TGL_FRONT) {
           if (front != 0) return;
           c->draw_triangle_back(c,p0,p1,p2);
         } else {
@@ -406,7 +406,7 @@
 #endif
     ZB_setTexture(c->zb,(PIXEL *)c->current_texture->images[0].pixmap);
     ZB_fillTriangleMappingPerspective(c->zb,&p0->zp,&p1->zp,&p2->zp);
-  } else if (c->current_shade_model == GL_SMOOTH) {
+  } else if (c->current_shade_model == TGL_SMOOTH) {
     ZB_fillTriangleSmooth(c->zb,&p0->zp,&p1->zp,&p2->zp);
   } else {
     ZB_fillTriangleFlat(c->zb,&p0->zp,&p1->zp,&p2->zp);

Index: get.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/get.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- get.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ get.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -5,25 +5,25 @@
   GLContext *c=gl_get_context();
 
   switch(pname) {
-  case GL_VIEWPORT:
+  case TGL_VIEWPORT:
     params[0]=c->viewport.xmin;
     params[1]=c->viewport.ymin;
     params[2]=c->viewport.xsize;
     params[3]=c->viewport.ysize;
     break;
-  case GL_MAX_MODELVIEW_STACK_DEPTH:
+  case TGL_MAX_MODELVIEW_STACK_DEPTH:
     *params = MAX_MODELVIEW_STACK_DEPTH;
     break;
-  case GL_MAX_PROJECTION_STACK_DEPTH:
+  case TGL_MAX_PROJECTION_STACK_DEPTH:
     *params = MAX_PROJECTION_STACK_DEPTH;
     break;
-  case GL_MAX_LIGHTS:
+  case TGL_MAX_LIGHTS:
     *params = MAX_LIGHTS;
     break;
-  case GL_MAX_TEXTURE_SIZE:
+  case TGL_MAX_TEXTURE_SIZE:
     *params = 256; /* not completely true, but... */
     break;
-  case GL_MAX_TEXTURE_STACK_DEPTH:
+  case TGL_MAX_TEXTURE_STACK_DEPTH:
     *params = MAX_TEXTURE_STACK_DEPTH;
     break;
   default:
@@ -38,11 +38,11 @@
   int mnr = 0; /* just a trick to return the correct matrix */
   GLContext *c = gl_get_context();
   switch (pname) {
-  case GL_TEXTURE_MATRIX:
+  case TGL_TEXTURE_MATRIX:
     mnr++; 
-  case GL_PROJECTION_MATRIX:
+  case TGL_PROJECTION_MATRIX:
     mnr++; 
-  case GL_MODELVIEW_MATRIX:
+  case TGL_MODELVIEW_MATRIX:
     {
       float *p = &c->matrix_stack_ptr[mnr]->m[0][0];;
       for (i = 0; i < 4; i++) {
@@ -54,16 +54,16 @@
       }
     } 
     break;
-  case GL_LINE_WIDTH:
+  case TGL_LINE_WIDTH:
     *v = 1.0f;
     break;
-  case GL_LINE_WIDTH_RANGE:
+  case TGL_LINE_WIDTH_RANGE:
     v[0] = v[1] = 1.0f;
     break;
-  case GL_POINT_SIZE:
+  case TGL_POINT_SIZE:
     *v = 1.0f;
     break;
-  case GL_POINT_SIZE_RANGE:
+  case TGL_POINT_SIZE_RANGE:
     v[0] = v[1] = 1.0f;
   default:
     fprintf(stderr,"warning: unknown pname in glGetFloatv()\n");

Index: gl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/gl.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gl.h	12 Jan 2005 15:26:45 -0000	1.2
+++ gl.h	12 Jan 2005 18:00:19 -0000	1.3
@@ -1,708 +1,708 @@
 /*
  * The following constants come from Mesa
  */
-#ifndef GL_H
-#define GL_H
+#ifndef TGL_H
+#define TGL_H
 
-#define GL_VERSION_1_1 1
+#define TGL_VERSION_1_1 1
 
[...1475 lines suppressed...]
+inline void tglVertex2i(int,int) {}
+inline void tglDepthMask(int) {}
+inline void tglFogi(int, int) {}
+inline void tglFogfv(int, const float*) {}
+inline void tglFogf(int, float) {}
+inline void tglRasterPos2f(float, float) {}
+inline void tglPolygonStipple(void*) {}
+inline void tglTexParameterf(int, int, int) {};
   */
 /* non compatible functions */
 
-void glDebug(int mode);
+void tglDebug(int mode);
 
-void glInit(void *zbuffer);
-void glClose(void);
+void tglInit(void *zbuffer);
+void tglClose(void);
 
 #endif

Index: init.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/init.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- init.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ init.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -27,7 +27,7 @@
 }
 
 
-void glInit(void *zbuffer1)
+void tglInit(void *zbuffer1)
 {
   ZBuffer *zbuffer=(ZBuffer *)zbuffer1;
   GLContext *c;
@@ -94,8 +94,8 @@
     m->specular=gl_V4_New(0,0,0,1);
     m->shininess=0;
   }
-  c->current_color_material_mode=GL_FRONT_AND_BACK;
-  c->current_color_material_type=GL_AMBIENT_AND_DIFFUSE;
+  c->current_color_material_mode=TGL_FRONT_AND_BACK;
+  c->current_color_material_type=TGL_AMBIENT_AND_DIFFUSE;
   c->color_material_enabled=0;
 
   /* textures */
@@ -122,12 +122,12 @@
   c->current_tex_coord.Z=0;
   c->current_tex_coord.W=1;
 
-  c->polygon_mode_front=GL_FILL;
-  c->polygon_mode_back=GL_FILL;
+  c->polygon_mode_front=TGL_FILL;
+  c->polygon_mode_back=TGL_FILL;
 
   c->current_front_face=0; /* 0 = GL_CCW  1 = GL_CW */
-  c->current_cull_face=GL_BACK;
-  c->current_shade_model=GL_SMOOTH;
+  c->current_cull_face=TGL_BACK;
+  c->current_shade_model=TGL_SMOOTH;
   c->cull_face_enabled=0;
   
   /* clear */
@@ -138,7 +138,7 @@
   c->clear_depth=0;
 
   /* selection */
-  c->render_mode=GL_RENDER;
+  c->render_mode=TGL_RENDER;
   c->select_buffer=NULL;
   c->name_stack_size=0;
 
@@ -154,12 +154,12 @@
     c->matrix_stack_ptr[i]=c->matrix_stack[i];
   }
 
-  glMatrixMode(GL_PROJECTION);
-  glLoadIdentity();
-  glMatrixMode(GL_TEXTURE);
-  glLoadIdentity();
-  glMatrixMode(GL_MODELVIEW);
-  glLoadIdentity();
+  tglMatrixMode(TGL_PROJECTION);
+  tglLoadIdentity();
+  tglMatrixMode(TGL_TEXTURE);
+  tglLoadIdentity();
+  tglMatrixMode(TGL_MODELVIEW);
+  tglLoadIdentity();
 
   c->matrix_model_projection_updated=1;
 
@@ -181,7 +181,7 @@
   c->depth_test = 0;
 }
 
-void glClose(void)
+void tglClose(void)
 {
   GLContext *c=gl_get_context();
   endSharedState(c);

Index: light.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/light.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- light.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ light.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -1,7 +1,7 @@
 #include "tinygl/zgl.h"
 #include "tinygl/msghandling.h"
 
-void glopMaterial(GLContext *c,GLParam *p)
+void glopMaterial(GLContext *c,TGLParam *p)
 {
   int mode=p[1].i;
   int type=p[2].i;
@@ -9,36 +9,36 @@
   int i;
   GLMaterial *m;
 
-  if (mode == GL_FRONT_AND_BACK) {
-    p[1].i=GL_FRONT;
+  if (mode == TGL_FRONT_AND_BACK) {
+    p[1].i=TGL_FRONT;
     glopMaterial(c,p);
-    mode=GL_BACK;
+    mode=TGL_BACK;
   }
-  if (mode == GL_FRONT) m=&c->materials[0];
+  if (mode == TGL_FRONT) m=&c->materials[0];
   else m=&c->materials[1];
 
   switch(type) {
-  case GL_EMISSION:
+  case TGL_EMISSION:
     for(i=0;i<4;i++)
       m->emission.v[i]=v[i];
     break;
-  case GL_AMBIENT:
+  case TGL_AMBIENT:
     for(i=0;i<4;i++)
       m->ambient.v[i]=v[i];
     break;
-  case GL_DIFFUSE:
+  case TGL_DIFFUSE:
     for(i=0;i<4;i++)
       m->diffuse.v[i]=v[i];
     break;
-  case GL_SPECULAR:
+  case TGL_SPECULAR:
     for(i=0;i<4;i++)
       m->specular.v[i]=v[i];
     break;
-  case GL_SHININESS:
+  case TGL_SHININESS:
     m->shininess=v[0];
     m->shininess_i = (v[0]/128.0f)*SPECULAR_BUFFER_RESOLUTION;
     break;
-  case GL_AMBIENT_AND_DIFFUSE:
+  case TGL_AMBIENT_AND_DIFFUSE:
     for(i=0;i<4;i++)
       m->diffuse.v[i]=v[i];
     for(i=0;i<4;i++)
@@ -49,7 +49,7 @@
   }
 }
 
-void glopColorMaterial(GLContext *c,GLParam *p)
+void glopColorMaterial(GLContext *c,TGLParam *p)
 {
   int mode=p[1].i;
   int type=p[2].i;
@@ -58,7 +58,7 @@
   c->current_color_material_type=type;
 }
 
-void glopLight(GLContext *c,GLParam *p)
+void glopLight(GLContext *c,TGLParam *p)
 {
   int light=p[1].i;
   int type=p[2].i;
@@ -66,23 +66,23 @@
   GLLight *l;
   int i;
   
-  assert(light >= GL_LIGHT0 && light < GL_LIGHT0+MAX_LIGHTS );
+  assert(light >= TGL_LIGHT0 && light < TGL_LIGHT0+MAX_LIGHTS );
 
-  l=&c->lights[light-GL_LIGHT0];
+  l=&c->lights[light-TGL_LIGHT0];
 
   for(i=0;i<4;i++) v.v[i]=p[3+i].f;
 
   switch(type) {
-  case GL_AMBIENT:
+  case TGL_AMBIENT:
     l->ambient=v;
     break;
-  case GL_DIFFUSE:
+  case TGL_DIFFUSE:
     l->diffuse=v;
     break;
-  case GL_SPECULAR:
+  case TGL_SPECULAR:
     l->specular=v;
     break;
-  case GL_POSITION:
+  case TGL_POSITION:
     {
       V4 pos;
       gl_M4_MulV4(&pos,c->matrix_stack_ptr[0],&v);
@@ -98,17 +98,17 @@
       }
     }
     break;
-  case GL_SPOT_DIRECTION:
+  case TGL_SPOT_DIRECTION:
     for(i=0;i<3;i++) {
       l->spot_direction.v[i]=v.v[i];
       l->norm_spot_direction.v[i]=v.v[i];
     }
     gl_V3_Norm(&l->norm_spot_direction);
     break;
-  case GL_SPOT_EXPONENT:
+  case TGL_SPOT_EXPONENT:
     l->spot_exponent=v.v[0];
     break;
-  case GL_SPOT_CUTOFF:
+  case TGL_SPOT_CUTOFF:
     {
       float a=v.v[0];
       assert(a == 180 || (a>=0 && a<=90));
@@ -116,13 +116,13 @@
       if (a != 180) l->cos_spot_cutoff=cos(a * PI / 180.0);
     }
     break;
-  case GL_CONSTANT_ATTENUATION:
+  case TGL_CONSTANT_ATTENUATION:
     l->attenuation[0]=v.v[0];
     break;
-  case GL_LINEAR_ATTENUATION:
+  case TGL_LINEAR_ATTENUATION:
     l->attenuation[1]=v.v[0];
     break;
-  case GL_QUADRATIC_ATTENUATION:
+  case TGL_QUADRATIC_ATTENUATION:
     l->attenuation[2]=v.v[0];
     break;
   default:
@@ -131,21 +131,21 @@
 }
   
 
-void glopLightModel(GLContext *c,GLParam *p)
+void glopLightModel(GLContext *c,TGLParam *p)
 {
   int pname=p[1].i;
   float *v=&p[2].f;
   int i;
 
   switch(pname) {
-  case GL_LIGHT_MODEL_AMBIENT:
+  case TGL_LIGHT_MODEL_AMBIENT:
     for(i=0;i<4;i++) 
       c->ambient_light_model.v[i]=v[i];
     break;
-  case GL_LIGHT_MODEL_LOCAL_VIEWER:
+  case TGL_LIGHT_MODEL_LOCAL_VIEWER:
     c->local_light_model=(int)v[0];
     break;
-  case GL_LIGHT_MODEL_TWO_SIDE:
+  case TGL_LIGHT_MODEL_TWO_SIDE:
     c->light_model_two_side = (int)v[0];
     break;
   default:

Index: list.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/list.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- list.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ list.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -7,7 +7,7 @@
 #include "opinfo.h"
 };
 
-static void (*op_table_func[])(GLContext *,GLParam *)=
+static void (*op_table_func[])(GLContext *,TGLParam *)=
 {
 #define ADD_OP(a,b,c) glop ## a ,
 
@@ -34,7 +34,7 @@
 
 static void delete_list(GLContext *c,int list)
 {
-  GLParamBuffer *pb,*pb1;
+  TGLParamBuffer *pb,*pb1;
   GLList *l;
 
   l=find_list(c,list);
@@ -55,10 +55,10 @@
 static GLList *alloc_list(GLContext *c,int list)
 {
   GLList *l;
-  GLParamBuffer *ob;
+  TGLParamBuffer *ob;
 
   l=(GLList *)gl_zalloc(sizeof(GLList));
-  ob=(GLParamBuffer *)gl_zalloc(sizeof(GLParamBuffer));
+  ob=(TGLParamBuffer *)gl_zalloc(sizeof(TGLParamBuffer));
 
   ob->next=NULL;
   l->first_op_buffer=ob;
@@ -70,7 +70,7 @@
 }
 
 
-void gl_print_op(FILE *f,GLParam *p)
+void gl_print_op(FILE *f,TGLParam *p)
 {
   int op;
   char *s;
@@ -99,10 +99,10 @@
 }
 
 
-void gl_compile_op(GLContext *c,GLParam *p)
+void gl_compile_op(GLContext *c,TGLParam *p)
 {
   int op,op_size;
-  GLParamBuffer *ob,*ob1;
+  TGLParamBuffer *ob,*ob1;
   int index,i;
 
   op=p[0].op;
@@ -113,7 +113,7 @@
   /* we should be able to add a NextBuffer opcode */
   if ((index + op_size) > (OP_BUFFER_MAX_SIZE-2)) {
 
-    ob1=(GLParamBuffer *)gl_zalloc(sizeof(GLParamBuffer));
+    ob1=(TGLParamBuffer *)gl_zalloc(sizeof(TGLParamBuffer));
     ob1->next=NULL;
 
     ob->next=ob1;
@@ -132,7 +132,7 @@
   c->current_op_buffer_index=index;
 }
 
-void gl_add_op(GLParam *p)
+void gl_add_op(TGLParam *p)
 {
   GLContext *c=gl_get_context();
   int op;
@@ -150,19 +150,19 @@
 }
 
 /* this opcode is never called directly */
-void glopEndList(GLContext *c,GLParam *p)
+void glopEndList(GLContext *c,TGLParam *p)
 {
   assert(0);
 }
 
 /* this opcode is never called directly */
-void glopNextBuffer(GLContext *c,GLParam *p)
+void glopNextBuffer(GLContext *c,TGLParam *p)
 {
   assert(0);
 }
 
 
-void glopCallList(GLContext *c,GLParam *p)
+void glopCallList(GLContext *c,TGLParam *p)
 {
   GLList *l;
   int list,op;
@@ -176,7 +176,7 @@
     op=p[0].op;
     if (op == OP_EndList) break;
     if (op == OP_NextBuffer) {
-      p=(GLParam *)p[1].p;
+      p=(TGLParam *)p[1].p;
     } else {
       op_table_func[op](c,p);
       p+=op_table_size[op];
@@ -191,7 +191,7 @@
   GLList *l;
   GLContext *c=gl_get_context();
 
-  assert(mode == GL_COMPILE || mode == GL_COMPILE_AND_EXECUTE);
+  assert(mode == TGL_COMPILE || mode == TGL_COMPILE_AND_EXECUTE);
   assert(c->compile_flag == 0);
 
   l=find_list(c,list);
@@ -202,13 +202,13 @@
   c->current_op_buffer_index=0;
   
   c->compile_flag=1;
-  c->exec_flag=(mode == GL_COMPILE_AND_EXECUTE);
+  c->exec_flag=(mode == TGL_COMPILE_AND_EXECUTE);
 }
 
 void glEndList(void)
 {
   GLContext *c=gl_get_context();
-  GLParam p[1];
+  TGLParam p[1];
 
   assert(c->compile_flag == 1);
   

Index: matrix.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/matrix.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- matrix.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ matrix.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -15,17 +15,17 @@
 }
 
 
-void glopMatrixMode(GLContext *c,GLParam *p)
+void glopMatrixMode(GLContext *c,TGLParam *p)
 {
   int mode=p[1].i;
   switch(mode) {
-  case GL_MODELVIEW:
+  case TGL_MODELVIEW:
     c->matrix_mode=0;
     break;
-  case GL_PROJECTION:
+  case TGL_PROJECTION:
     c->matrix_mode=1;
     break;
-  case GL_TEXTURE:
+  case TGL_TEXTURE:
     c->matrix_mode=2;
     break;
   default:
@@ -33,12 +33,12 @@
   }
 }
 
-void glopLoadMatrix(GLContext *c,GLParam *p)
+void glopLoadMatrix(GLContext *c,TGLParam *p)
 {
   M4 *m;
   int i;
   
-  GLParam *q;
+  TGLParam *q;
 
   m=c->matrix_stack_ptr[c->matrix_mode];
   q=p+1;
@@ -54,7 +54,7 @@
   gl_matrix_update(c);
 }
 
-void glopLoadIdentity(GLContext *c,GLParam *p)
+void glopLoadIdentity(GLContext *c,TGLParam *p)
 {
 
   gl_M4_Id(c->matrix_stack_ptr[c->matrix_mode]);
@@ -62,12 +62,12 @@
   gl_matrix_update(c);
 }
 
-void glopMultMatrix(GLContext *c,GLParam *p)
+void glopMultMatrix(GLContext *c,TGLParam *p)
 {
   M4 m;
   int i;
 
-  GLParam *q;
+  TGLParam *q;
   q=p+1;
 
   for(i=0;i<4;i++) {
@@ -84,7 +84,7 @@
 }
 
 
-void glopPushMatrix(GLContext *c,GLParam *p)
+void glopPushMatrix(GLContext *c,TGLParam *p)
 {
   int n=c->matrix_mode;
   M4 *m;
@@ -99,7 +99,7 @@
   gl_matrix_update(c);
 }
 
-void glopPopMatrix(GLContext *c,GLParam *p)
+void glopPopMatrix(GLContext *c,TGLParam *p)
 {
   int n=c->matrix_mode;
 
@@ -109,7 +109,7 @@
 }
 
 
-void glopRotate(GLContext *c,GLParam *p)
+void glopRotate(GLContext *c,TGLParam *p)
 {
   M4 m;
   float u[3];
@@ -179,7 +179,7 @@
   gl_matrix_update(c);
 }
 
-void glopScale(GLContext *c,GLParam *p)
+void glopScale(GLContext *c,TGLParam *p)
 {
   float *m;
   float x=p[1].f,y=p[2].f,z=p[3].f;
@@ -193,7 +193,7 @@
   gl_matrix_update(c);
 }
 
-void glopTranslate(GLContext *c,GLParam *p)
+void glopTranslate(GLContext *c,TGLParam *p)
 {
   float *m;
   float x=p[1].f,y=p[2].f,z=p[3].f;
@@ -209,7 +209,7 @@
 }
 
 
-void glopFrustum(GLContext *c,GLParam *p)
+void glopFrustum(GLContext *c,TGLParam *p)
 {
   float *r;
   M4 m;

Index: misc.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/misc.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- misc.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ misc.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -1,7 +1,7 @@
 #include "tinygl/zgl.h"
 #include "msghandling.h"
 
-void glopViewport(GLContext *c,GLParam *p)
+void glopViewport(GLContext *c,TGLParam *p)
 {
   int xsize,ysize,xmin,ymin,xsize_req,ysize_req;
   
@@ -42,45 +42,45 @@
   }
 }
 
-void glopEnableDisable(GLContext *c,GLParam *p)
+void glopEnableDisable(GLContext *c,TGLParam *p)
 {
   int code=p[1].i;
   int v=p[2].i;
 
   switch(code) {
-  case GL_CULL_FACE:
+  case TGL_CULL_FACE:
     c->cull_face_enabled=v;
     break;
-  case GL_LIGHTING:
+  case TGL_LIGHTING:
     c->lighting_enabled=v;
     break;
-  case GL_COLOR_MATERIAL:
+  case TGL_COLOR_MATERIAL:
     c->color_material_enabled=v;
       break;
-  case GL_TEXTURE_2D:
+  case TGL_TEXTURE_2D:
     c->texture_2d_enabled=v;
     break;
-  case GL_NORMALIZE:
+  case TGL_NORMALIZE:
     c->normalize_enabled=v;
     break;
-  case GL_DEPTH_TEST:
+  case TGL_DEPTH_TEST:
     c->depth_test = v;
     break;
-  case GL_POLYGON_OFFSET_FILL:
+  case TGL_POLYGON_OFFSET_FILL:
     if (v) c->offset_states |= TGL_OFFSET_FILL;
     else c->offset_states &= ~TGL_OFFSET_FILL;
     break; 
-  case GL_POLYGON_OFFSET_POINT:
+  case TGL_POLYGON_OFFSET_POINT:
     if (v) c->offset_states |= TGL_OFFSET_POINT;
     else c->offset_states &= ~TGL_OFFSET_POINT;
     break; 
-  case GL_POLYGON_OFFSET_LINE:
+  case TGL_POLYGON_OFFSET_LINE:
     if (v) c->offset_states |= TGL_OFFSET_LINE;
     else c->offset_states &= ~TGL_OFFSET_LINE;
     break; 
   default:
-    if (code>=GL_LIGHT0 && code<GL_LIGHT0+MAX_LIGHTS) {
-      gl_enable_disable_light(c,code - GL_LIGHT0, v);
+    if (code>=TGL_LIGHT0 && code<TGL_LIGHT0+MAX_LIGHTS) {
+      gl_enable_disable_light(c,code - TGL_LIGHT0, v);
     } else {
       /*
       fprintf(stderr,"glEnableDisable: 0x%X not supported.\n",code);
@@ -90,37 +90,37 @@
   }
 }
 
-void glopShadeModel(GLContext *c,GLParam *p)
+void glopShadeModel(GLContext *c,TGLParam *p)
 {
   int code=p[1].i;
   c->current_shade_model=code;
 }
 
-void glopCullFace(GLContext *c,GLParam *p)
+void glopCullFace(GLContext *c,TGLParam *p)
 {
   int code=p[1].i;
   c->current_cull_face=code;
 }
 
-void glopFrontFace(GLContext *c,GLParam *p)
+void glopFrontFace(GLContext *c,TGLParam *p)
 {
   int code=p[1].i;
   c->current_front_face=code;
 }
 
-void glopPolygonMode(GLContext *c,GLParam *p)
+void glopPolygonMode(GLContext *c,TGLParam *p)
 {
   int face=p[1].i;
   int mode=p[2].i;
   
   switch(face) {
-  case GL_BACK:
+  case TGL_BACK:
     c->polygon_mode_back=mode;
     break;
-  case GL_FRONT:
+  case TGL_FRONT:
     c->polygon_mode_front=mode;
     break;
-  case GL_FRONT_AND_BACK:
+  case TGL_FRONT_AND_BACK:
     c->polygon_mode_front=mode;
     c->polygon_mode_back=mode;
     break;
@@ -129,7 +129,7 @@
   }
 }
 
-void glopHint(GLContext *c,GLParam *p)
+void glopHint(GLContext *c,TGLParam *p)
 {
 #if 0
   int target=p[1].i;
@@ -140,7 +140,7 @@
 }
 
 void 
-glopPolygonOffset(GLContext *c, GLParam *p)
+glopPolygonOffset(GLContext *c, TGLParam *p)
 {
   c->offset_factor = p[1].f;
   c->offset_units = p[2].f;

Index: select.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/select.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- select.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ select.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -6,9 +6,9 @@
   int result=0;
   
   switch(c->render_mode) {
-  case GL_RENDER:
+  case TGL_RENDER:
     break;
-  case GL_SELECT:
+  case TGL_SELECT:
     if (c->select_overflow) {
       result=-c->select_hits;
     } else {
@@ -22,11 +22,11 @@
     assert(0);
   }
   switch(mode) {
-  case GL_RENDER:
-    c->render_mode=GL_RENDER;
+  case TGL_RENDER:
+    c->render_mode=TGL_RENDER;
     break;
-  case GL_SELECT:
-    c->render_mode=GL_SELECT;
+  case TGL_SELECT:
+    c->render_mode=TGL_SELECT;
     assert( c->select_buffer != NULL);
     c->select_ptr=c->select_buffer;
     c->select_hits=0;
@@ -43,42 +43,42 @@
 {
   GLContext *c=gl_get_context();
 
-  assert(c->render_mode != GL_SELECT);
+  assert(c->render_mode != TGL_SELECT);
   
   c->select_buffer=buf;
   c->select_size=size;
 }
 
 
-void glopInitNames(GLContext *c,GLParam *p)
+void glopInitNames(GLContext *c,TGLParam *p)
 {
-  if (c->render_mode == GL_SELECT) {
+  if (c->render_mode == TGL_SELECT) {
     c->name_stack_size=0;
     c->select_hit=NULL;
   }
 }
 
-void glopPushName(GLContext *c,GLParam *p)
+void glopPushName(GLContext *c,TGLParam *p)
 {
-  if (c->render_mode == GL_SELECT) {
+  if (c->render_mode == TGL_SELECT) {
     assert(c->name_stack_size<MAX_NAME_STACK_DEPTH);
     c->name_stack[c->name_stack_size++]=p[1].i;
     c->select_hit=NULL;
   }
 }
 
-void glopPopName(GLContext *c,GLParam *p)
+void glopPopName(GLContext *c,TGLParam *p)
 {
-  if (c->render_mode == GL_SELECT) {
+  if (c->render_mode == TGL_SELECT) {
     assert(c->name_stack_size>0);
     c->name_stack_size--;
     c->select_hit=NULL;
   }
 }
 
-void glopLoadName(GLContext *c,GLParam *p)
+void glopLoadName(GLContext *c,TGLParam *p)
 {
-  if (c->render_mode == GL_SELECT) {
+  if (c->render_mode == TGL_SELECT) {
    assert(c->name_stack_size>0);
    c->name_stack[c->name_stack_size-1]=p[1].i;
    c->select_hit=NULL;

Index: texture.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/texture.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- texture.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ texture.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -67,7 +67,7 @@
   c->current_texture=find_texture(c,0);
 }
 
-void glGenTextures(int n, unsigned int *textures)
+void tglGenTextures(int n, unsigned int *textures)
 {
   GLContext *c=gl_get_context();
   int max,i;
@@ -88,7 +88,7 @@
 }
 
 
-void glDeleteTextures(int n, const unsigned int *textures)
+void tglDeleteTextures(int n, const unsigned int *textures)
 {
   GLContext *c=gl_get_context();
   int i;
@@ -98,7 +98,7 @@
     t=find_texture(c,textures[i]);
     if (t!=NULL && t!=0) {
       if (t==c->current_texture) {
-	glBindTexture(GL_TEXTURE_2D,0);
+	tglBindTexture(TGL_TEXTURE_2D,0);
       }
       free_texture(c,textures[i]);
     }
@@ -106,13 +106,13 @@
 }
 
 
-void glopBindTexture(GLContext *c,GLParam *p)
+void glopBindTexture(GLContext *c,TGLParam *p)
 {
   int target=p[1].i;
   int texture=p[2].i;
   GLTexture *t;
 
-  assert(target == GL_TEXTURE_2D && texture >= 0);
+  assert(target == TGL_TEXTURE_2D && texture >= 0);
 
   t=find_texture(c,texture);
   if (t==NULL) {
@@ -121,7 +121,7 @@
   c->current_texture=t;
 }
 
-void glopTexImage2D(GLContext *c,GLParam *p)
+void glopTexImage2D(GLContext *c,TGLParam *p)
 {
   int target=p[1].i;
   int level=p[2].i;
@@ -136,9 +136,9 @@
   unsigned char *pixels1;
   int do_free;
 
-  if (!(target == GL_TEXTURE_2D && level == 0 && components == 3 && 
-        border == 0 && format == GL_RGB &&
-        type == GL_UNSIGNED_BYTE)) {
+  if (!(target == TGL_TEXTURE_2D && level == 0 && components == 3 && 
+        border == 0 && format == TGL_RGB &&
+        type == TGL_UNSIGNED_BYTE)) {
     gl_fatal_error("glTexImage2D: combinaison of parameters not handled");
   }
   
@@ -181,48 +181,48 @@
 
 
 /* TODO: not all tests are done */
-void glopTexEnv(GLContext *c,GLParam *p)
+void glopTexEnv(GLContext *c,TGLParam *p)
 {
   int target=p[1].i;
   int pname=p[2].i;
   int param=p[3].i;
 
-  if (target != GL_TEXTURE_ENV) {
+  if (target != TGL_TEXTURE_ENV) {
   error:
     gl_fatal_error("glTexParameter: unsupported option");
   }
 
-  if (pname != GL_TEXTURE_ENV_MODE) goto error;
+  if (pname != TGL_TEXTURE_ENV_MODE) goto error;
 
-  if (param != GL_DECAL) goto error;
+  if (param != TGL_DECAL) goto error;
 }
 
 /* TODO: not all tests are done */
-void glopTexParameter(GLContext *c,GLParam *p)
+void glopTexParameter(GLContext *c,TGLParam *p)
 {
   int target=p[1].i;
   int pname=p[2].i;
   int param=p[3].i;
   
-  if (target != GL_TEXTURE_2D) {
+  if (target != TGL_TEXTURE_2D) {
   error:
     gl_fatal_error("glTexParameter: unsupported option");
   }
 
   switch(pname) {
-  case GL_TEXTURE_WRAP_S:
-  case GL_TEXTURE_WRAP_T:
-    if (param != GL_REPEAT) goto error;
+  case TGL_TEXTURE_WRAP_S:
+  case TGL_TEXTURE_WRAP_T:
+    if (param != TGL_REPEAT) goto error;
     break;
   }
 }
 
-void glopPixelStore(GLContext *c,GLParam *p)
+void glopPixelStore(GLContext *c,TGLParam *p)
 {
   int pname=p[1].i;
   int param=p[2].i;
 
-  if (pname != GL_UNPACK_ALIGNMENT ||
+  if (pname != TGL_UNPACK_ALIGNMENT ||
       param != 1) {
     gl_fatal_error("glPixelStore: unsupported option");
   }

Index: vertex.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/vertex.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- vertex.cpp	12 Jan 2005 15:26:45 -0000	1.2
+++ vertex.cpp	12 Jan 2005 18:00:19 -0000	1.3
@@ -1,7 +1,7 @@
 #include "tinygl/zgl.h"
 #include <string.h>
 
-void glopNormal(GLContext * c, GLParam * p)
+void glopNormal(GLContext * c, TGLParam * p)
 {
     V3 v;
 
@@ -15,7 +15,7 @@
     c->current_normal.W = 0;
 }
 
-void glopTexCoord(GLContext * c, GLParam * p)
+void glopTexCoord(GLContext * c, TGLParam * p)
 {
     c->current_tex_coord.X = p[1].f;
     c->current_tex_coord.Y = p[2].f;
@@ -23,12 +23,12 @@
     c->current_tex_coord.W = p[4].f;
 }
 
-void glopEdgeFlag(GLContext * c, GLParam * p)
+void glopEdgeFlag(GLContext * c, TGLParam * p)
 {
     c->current_edge_flag = p[1].i;
 }
 
-void glopColor(GLContext * c, GLParam * p)
+void glopColor(GLContext * c, TGLParam * p)
 {
 
     c->current_color.X = p[1].f;
@@ -40,7 +40,7 @@
     c->longcurrent_color[2] = p[7].ui;
 
     if (c->color_material_enabled) {
-	GLParam q[7];
+	TGLParam q[7];
 	q[0].op = OP_Material;
 	q[1].i = c->current_color_material_mode;
 	q[2].i = c->current_color_material_type;
@@ -69,7 +69,7 @@
     v->scale.Z = -((zsize - 0.5) / 2.0);
 }
 
-void glopBegin(GLContext * c, GLParam * p)
+void glopBegin(GLContext * c, TGLParam * p)
 {
     int type;
     M4 tmp;
@@ -111,15 +111,15 @@
 	c->viewport.updated = 0;
     }
     /* triangle drawing functions */
-    if (c->render_mode == GL_SELECT) {
+    if (c->render_mode == TGL_SELECT) {
 	c->draw_triangle_front = gl_draw_triangle_select;
 	c->draw_triangle_back = gl_draw_triangle_select;
     } else {
 	switch (c->polygon_mode_front) {
-	case GL_POINT:
+	case TGL_POINT:
 	    c->draw_triangle_front = gl_draw_triangle_point;
 	    break;
-	case GL_LINE:
+	case TGL_LINE:
 	    c->draw_triangle_front = gl_draw_triangle_line;
 	    break;
 	default:
@@ -128,10 +128,10 @@
 	}
 
 	switch (c->polygon_mode_back) {
-	case GL_POINT:
+	case TGL_POINT:
 	    c->draw_triangle_back = gl_draw_triangle_point;
 	    break;
-	case GL_LINE:
+	case TGL_LINE:
 	    c->draw_triangle_back = gl_draw_triangle_line;
 	    break;
 	default:
@@ -204,7 +204,7 @@
     v->clip_code = gl_clipcode(v->pc.X, v->pc.Y, v->pc.Z, v->pc.W);
 }
 
-void glopVertex(GLContext * c, GLParam * p)
+void glopVertex(GLContext * c, TGLParam * p)
 {
     GLVertex *v;
     int n, i, cnt;
@@ -265,19 +265,19 @@
     v->edge_flag = c->current_edge_flag;
 
     switch (c->begin_type) {
-    case GL_POINTS:
+    case TGL_POINTS:
 	gl_draw_point(c, &c->vertex[0]);
 	n = 0;
 	break;
 
-    case GL_LINES:
+    case TGL_LINES:
 	if (n == 2) {
 	    gl_draw_line(c, &c->vertex[0], &c->vertex[1]);
 	    n = 0;
 	}
 	break;
-    case GL_LINE_STRIP:
-    case GL_LINE_LOOP:
+    case TGL_LINE_STRIP:
+    case TGL_LINE_LOOP:
 	if (n == 1) {
 	    c->vertex[2] = c->vertex[0];
 	} else if (n == 2) {
@@ -287,13 +287,13 @@
 	}
 	break;
 
-    case GL_TRIANGLES:
+    case TGL_TRIANGLES:
 	if (n == 3) {
 	    gl_draw_triangle(c, &c->vertex[0], &c->vertex[1], &c->vertex[2]);
 	    n = 0;
 	}
 	break;
-    case GL_TRIANGLE_STRIP:
+    case TGL_TRIANGLE_STRIP:
 	if (cnt >= 3) {
 	    if (n == 3)
 		n = 0;
@@ -309,7 +309,7 @@
             }
 	}
 	break;
-    case GL_TRIANGLE_FAN:
+    case TGL_TRIANGLE_FAN:
 	if (n == 3) {
 	    gl_draw_triangle(c, &c->vertex[0], &c->vertex[1], &c->vertex[2]);
 	    c->vertex[1] = c->vertex[2];
@@ -317,7 +317,7 @@
 	}
 	break;
 
-    case GL_QUADS:
+    case TGL_QUADS:
 	if (n == 4) {
 	    c->vertex[2].edge_flag = 0;
 	    gl_draw_triangle(c, &c->vertex[0], &c->vertex[1], &c->vertex[2]);
@@ -328,7 +328,7 @@
 	}
 	break;
 
-    case GL_QUAD_STRIP:
+    case TGL_QUAD_STRIP:
 	if (n == 4) {
 	    gl_draw_triangle(c, &c->vertex[0], &c->vertex[1], &c->vertex[2]);
 	    gl_draw_triangle(c, &c->vertex[1], &c->vertex[3], &c->vertex[2]);
@@ -337,7 +337,7 @@
 	    n = 2;
 	}
 	break;
-    case GL_POLYGON:
+    case TGL_POLYGON:
 	break;
     default:
 	gl_fatal_error("glBegin: type %x not handled\n", c->begin_type);
@@ -346,15 +346,15 @@
     c->vertex_n = n;
 }
 
-void glopEnd(GLContext * c, GLParam * param)
+void glopEnd(GLContext * c, TGLParam * param)
 {
     assert(c->in_begin == 1);
 
-    if (c->begin_type == GL_LINE_LOOP) {
+    if (c->begin_type == TGL_LINE_LOOP) {
 	if (c->vertex_cnt >= 3) {
 	    gl_draw_line(c, &c->vertex[0], &c->vertex[2]);
 	}
-    } else if (c->begin_type == GL_POLYGON) {
+    } else if (c->begin_type == TGL_POLYGON) {
 	int i = c->vertex_cnt;
 	while (i >= 3) {
 	    i--;

Index: zgl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/zgl.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- zgl.h	12 Jan 2005 15:26:45 -0000	1.2
+++ zgl.h	12 Jan 2005 18:00:19 -0000	1.3
@@ -99,15 +99,15 @@
   int i;
   unsigned int ui;
   void *p;
-} GLParam;
+} TGLParam;
 
-typedef struct GLParamBuffer {
-  GLParam ops[OP_BUFFER_MAX_SIZE];
-  struct GLParamBuffer *next;
-} GLParamBuffer;
+typedef struct TGLParamBuffer {
+  TGLParam ops[OP_BUFFER_MAX_SIZE];
+  struct TGLParamBuffer *next;
+} TGLParamBuffer;
 
 typedef struct GLList {
-  GLParamBuffer *first_op_buffer;
+  TGLParamBuffer *first_op_buffer;
   /* TODO: extensions for an hash table or a better allocating scheme */
 } GLList;
 
@@ -181,7 +181,7 @@
   GLSharedState shared_state;
 
   /* current list */
-  GLParamBuffer *current_op_buffer;
+  TGLParamBuffer *current_op_buffer;
   int current_op_buffer_index;
   int exec_flag,compile_flag,print_flag;
 
@@ -278,7 +278,7 @@
 
 extern GLContext *gl_ctx;
 
-void gl_add_op(GLParam *p);
+void gl_add_op(TGLParam *p);
 
 /* clip.c */
 void gl_transform_to_viewport(GLContext *c,GLVertex *v);
@@ -298,8 +298,8 @@
 /* matrix.c */
 void gl_print_matrix(const float *m);
 /*
-void glopLoadIdentity(GLContext *c,GLParam *p);
-void glopTranslate(GLContext *c,GLParam *p);*/
+void glopLoadIdentity(GLContext *c,TGLParam *p);
+void glopTranslate(GLContext *c,TGLParam *p);*/
 
 /* light.c */
 void gl_add_select(GLContext *c,unsigned int zmin,unsigned int zmax);
@@ -344,7 +344,7 @@
 
 /* glopXXX functions */
 
-#define ADD_OP(a,b,c) void glop ## a (GLContext *,GLParam *);
+#define ADD_OP(a,b,c) void glop ## a (GLContext *,TGLParam *);
 #include "opinfo.h"
 
 /* this clip epsilon is needed to avoid some rounding errors after





More information about the Scummvm-git-logs mailing list