aboutsummaryrefslogtreecommitdiffstats
path: root/code/renderer
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-09-05 18:17:46 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-09-05 18:17:46 +0000
commitd37536edf4660f3c46e4876b6d72e9a200549ffe (patch)
tree637eb5f3e49f4075ecdef97a31f5e8157cee73a2 /code/renderer
parent4496eacc4ec7406fd694693da5a7f9589933f7fd (diff)
downloadioquake3-aero-d37536edf4660f3c46e4876b6d72e9a200549ffe.tar.gz
ioquake3-aero-d37536edf4660f3c46e4876b6d72e9a200549ffe.zip
* Merge unified-sdl to trunk
* Bump Q3_VERSION to 1.35 git-svn-id: svn://svn.icculus.org/quake3/trunk@1161 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/renderer')
-rw-r--r--code/renderer/qgl.h816
-rw-r--r--code/renderer/qgl_linked.h357
-rw-r--r--code/renderer/tr_cmds.c2
-rw-r--r--code/renderer/tr_image.c17
-rw-r--r--code/renderer/tr_init.c15
-rw-r--r--code/renderer/tr_light.c3
-rw-r--r--code/renderer/tr_shader.c4
-rw-r--r--code/renderer/tr_types.h29
8 files changed, 359 insertions, 884 deletions
diff --git a/code/renderer/qgl.h b/code/renderer/qgl.h
index 52ba8ca..2dc6b35 100644
--- a/code/renderer/qgl.h
+++ b/code/renderer/qgl.h
@@ -26,11 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef __QGL_H__
#define __QGL_H__
-#if defined( __LINT__ )
-
-#include <GL/gl.h>
-
-#elif defined( _WIN32 )
+#if defined( _WIN32 )
#if _MSC_VER
#pragma warning (disable: 4201)
@@ -43,6 +39,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <windows.h>
#include <GL/gl.h>
+#include <GL/glext.h>
#elif defined(MACOS_X)
@@ -53,41 +50,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <OpenGL/glext.h>
#endif
-// This can be defined to use the CGLMacro.h support which avoids looking up
-// the current context.
-//#define USE_CGLMACROS
-
-#ifdef USE_CGLMACROS
-#include "macosx_local.h"
-#define cgl_ctx glw_state._cgl_ctx
-#include <OpenGL/CGLMacro.h>
-#endif
-
-#elif defined( __linux__ ) || defined(__FreeBSD__)
-
-#include <GL/gl.h>
-#include <GL/glx.h>
-// bk001129 - from cvs1.17 (mkv)
-#if defined(__FX__)
-#include <GL/fxmesa.h>
-#endif
-
-#elif defined( __sun )
-#include <GL/gl.h>
-#include <GL/glx.h>
-
#else
-#include <gl.h>
+#include <GL/gl.h>
+#include <GL/glext.h>
#endif
#ifndef APIENTRY
#define APIENTRY
#endif
-#ifndef WINAPI
-#define WINAPI
-#endif
//===========================================================================
@@ -109,6 +81,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#else
+// FIXME GL_MAX_TEXTURE_UNITS_ARB?
#define GL_MAX_ACTIVE_TEXTURES_ARB 0x84E2
#endif /* defined(__sun) */
@@ -122,9 +95,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define GL_CLAMP_TO_EDGE 0x812F
#endif
-//===========================================================================
+// S3TC compression constants
+#define GL_RGB_S3TC 0x83A0
+#define GL_RGB4_S3TC 0x83A1
-// NOTE: some Linux platforms would need those prototypes
#if defined(MACOS_X) || ( defined(__sun) && defined(__sparc) )
typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
@@ -162,445 +136,351 @@ typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target);
typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum target);
#endif
-// TTimo - VC7 / XP ?
-#ifdef WIN32
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
-typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target);
-typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum target);
-#endif
-
-/*
-** extension constants
-*/
-
-
-// S3TC compression constants
-#define GL_RGB_S3TC 0x83A0
-#define GL_RGB4_S3TC 0x83A1
-
+//===========================================================================
// extensions will be function pointers on all platforms
+extern void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
+extern void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
+extern void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture );
-extern void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
-extern void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
-extern void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture );
-
-extern void ( APIENTRY * qglLockArraysEXT) (GLint, GLint);
-extern void ( APIENTRY * qglUnlockArraysEXT) (void);
+extern void ( APIENTRY * qglLockArraysEXT)( GLint, GLint);
+extern void ( APIENTRY * qglUnlockArraysEXT) ( void );
//===========================================================================
-// non-dlopening systems will just redefine qgl* to gl*
-#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __linux__ ) && !defined( __FreeBSD__ ) && !defined(__sun) // rb010123
-
-#include "qgl_linked.h"
-
-#elif (defined(MACOS_X) && !defined(USE_SDL_VIDEO))
-// This includes #ifdefs for optional logging and GL error checking after every GL call as well as #defines to prevent incorrect usage of the non-'qgl' versions of the GL API.
-#include "macosx_qgl.h"
-
-#else
-
-// windows systems use a function pointer for each call so we can load minidrivers
-
-extern void ( APIENTRY * qglAccum )(GLenum op, GLfloat value);
-extern void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref);
-extern GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences);
-extern void ( APIENTRY * qglArrayElement )(GLint i);
-extern void ( APIENTRY * qglBegin )(GLenum mode);
-extern void ( APIENTRY * qglBindTexture )(GLenum target, GLuint texture);
-extern void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
-extern void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor);
-extern void ( APIENTRY * qglCallList )(GLuint list);
-extern void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists);
-extern void ( APIENTRY * qglClear )(GLbitfield mask);
-extern void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-extern void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-extern void ( APIENTRY * qglClearDepth )(GLclampd depth);
-extern void ( APIENTRY * qglClearIndex )(GLfloat c);
-extern void ( APIENTRY * qglClearStencil )(GLint s);
-extern void ( APIENTRY * qglClipPlane )(GLenum plane, const GLdouble *equation);
-extern void ( APIENTRY * qglColor3b )(GLbyte red, GLbyte green, GLbyte blue);
-extern void ( APIENTRY * qglColor3bv )(const GLbyte *v);
-extern void ( APIENTRY * qglColor3d )(GLdouble red, GLdouble green, GLdouble blue);
-extern void ( APIENTRY * qglColor3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglColor3f )(GLfloat red, GLfloat green, GLfloat blue);
-extern void ( APIENTRY * qglColor3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglColor3i )(GLint red, GLint green, GLint blue);
-extern void ( APIENTRY * qglColor3iv )(const GLint *v);
-extern void ( APIENTRY * qglColor3s )(GLshort red, GLshort green, GLshort blue);
-extern void ( APIENTRY * qglColor3sv )(const GLshort *v);
-extern void ( APIENTRY * qglColor3ub )(GLubyte red, GLubyte green, GLubyte blue);
-extern void ( APIENTRY * qglColor3ubv )(const GLubyte *v);
-extern void ( APIENTRY * qglColor3ui )(GLuint red, GLuint green, GLuint blue);
-extern void ( APIENTRY * qglColor3uiv )(const GLuint *v);
-extern void ( APIENTRY * qglColor3us )(GLushort red, GLushort green, GLushort blue);
-extern void ( APIENTRY * qglColor3usv )(const GLushort *v);
-extern void ( APIENTRY * qglColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
-extern void ( APIENTRY * qglColor4bv )(const GLbyte *v);
-extern void ( APIENTRY * qglColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
-extern void ( APIENTRY * qglColor4dv )(const GLdouble *v);
-extern void ( APIENTRY * qglColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-extern void ( APIENTRY * qglColor4fv )(const GLfloat *v);
-extern void ( APIENTRY * qglColor4i )(GLint red, GLint green, GLint blue, GLint alpha);
-extern void ( APIENTRY * qglColor4iv )(const GLint *v);
-extern void ( APIENTRY * qglColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha);
-extern void ( APIENTRY * qglColor4sv )(const GLshort *v);
-extern void ( APIENTRY * qglColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
-extern void ( APIENTRY * qglColor4ubv )(const GLubyte *v);
-extern void ( APIENTRY * qglColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha);
-extern void ( APIENTRY * qglColor4uiv )(const GLuint *v);
-extern void ( APIENTRY * qglColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha);
-extern void ( APIENTRY * qglColor4usv )(const GLushort *v);
-extern void ( APIENTRY * qglColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-extern void ( APIENTRY * qglColorMaterial )(GLenum face, GLenum mode);
-extern void ( APIENTRY * qglColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
-extern void ( APIENTRY * qglCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
-extern void ( APIENTRY * qglCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-extern void ( APIENTRY * qglCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-extern void ( APIENTRY * qglCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-extern void ( APIENTRY * qglCullFace )(GLenum mode);
-extern void ( APIENTRY * qglDeleteLists )(GLuint list, GLsizei range);
-extern void ( APIENTRY * qglDeleteTextures )(GLsizei n, const GLuint *textures);
-extern void ( APIENTRY * qglDepthFunc )(GLenum func);
-extern void ( APIENTRY * qglDepthMask )(GLboolean flag);
-extern void ( APIENTRY * qglDepthRange )(GLclampd zNear, GLclampd zFar);
-extern void ( APIENTRY * qglDisable )(GLenum cap);
-extern void ( APIENTRY * qglDisableClientState )(GLenum array);
-extern void ( APIENTRY * qglDrawArrays )(GLenum mode, GLint first, GLsizei count);
-extern void ( APIENTRY * qglDrawBuffer )(GLenum mode);
-extern void ( APIENTRY * qglDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
-extern void ( APIENTRY * qglDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglEdgeFlag )(GLboolean flag);
-extern void ( APIENTRY * qglEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglEdgeFlagv )(const GLboolean *flag);
-extern void ( APIENTRY * qglEnable )(GLenum cap);
-extern void ( APIENTRY * qglEnableClientState )(GLenum array);
-extern void ( APIENTRY * qglEnd )(void);
-extern void ( APIENTRY * qglEndList )(void);
-extern void ( APIENTRY * qglEvalCoord1d )(GLdouble u);
-extern void ( APIENTRY * qglEvalCoord1dv )(const GLdouble *u);
-extern void ( APIENTRY * qglEvalCoord1f )(GLfloat u);
-extern void ( APIENTRY * qglEvalCoord1fv )(const GLfloat *u);
-extern void ( APIENTRY * qglEvalCoord2d )(GLdouble u, GLdouble v);
-extern void ( APIENTRY * qglEvalCoord2dv )(const GLdouble *u);
-extern void ( APIENTRY * qglEvalCoord2f )(GLfloat u, GLfloat v);
-extern void ( APIENTRY * qglEvalCoord2fv )(const GLfloat *u);
-extern void ( APIENTRY * qglEvalMesh1 )(GLenum mode, GLint i1, GLint i2);
-extern void ( APIENTRY * qglEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
-extern void ( APIENTRY * qglEvalPoint1 )(GLint i);
-extern void ( APIENTRY * qglEvalPoint2 )(GLint i, GLint j);
-extern void ( APIENTRY * qglFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer);
-extern void ( APIENTRY * qglFinish )(void);
-extern void ( APIENTRY * qglFlush )(void);
-extern void ( APIENTRY * qglFogf )(GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglFogfv )(GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglFogi )(GLenum pname, GLint param);
-extern void ( APIENTRY * qglFogiv )(GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglFrontFace )(GLenum mode);
-extern void ( APIENTRY * qglFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-extern GLuint ( APIENTRY * qglGenLists )(GLsizei range);
-extern void ( APIENTRY * qglGenTextures )(GLsizei n, GLuint *textures);
-extern void ( APIENTRY * qglGetBooleanv )(GLenum pname, GLboolean *params);
-extern void ( APIENTRY * qglGetClipPlane )(GLenum plane, GLdouble *equation);
-extern void ( APIENTRY * qglGetDoublev )(GLenum pname, GLdouble *params);
-extern GLenum ( APIENTRY * qglGetError )(void);
-extern void ( APIENTRY * qglGetFloatv )(GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetIntegerv )(GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetLightfv )(GLenum light, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetLightiv )(GLenum light, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetMapdv )(GLenum target, GLenum query, GLdouble *v);
-extern void ( APIENTRY * qglGetMapfv )(GLenum target, GLenum query, GLfloat *v);
-extern void ( APIENTRY * qglGetMapiv )(GLenum target, GLenum query, GLint *v);
-extern void ( APIENTRY * qglGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetMaterialiv )(GLenum face, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetPixelMapfv )(GLenum map, GLfloat *values);
-extern void ( APIENTRY * qglGetPixelMapuiv )(GLenum map, GLuint *values);
-extern void ( APIENTRY * qglGetPixelMapusv )(GLenum map, GLushort *values);
-extern void ( APIENTRY * qglGetPointerv )(GLenum pname, GLvoid* *params);
-extern void ( APIENTRY * qglGetPolygonStipple )(GLubyte *mask);
-extern const GLubyte * ( APIENTRY * qglGetString )(GLenum name);
-extern void ( APIENTRY * qglGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetTexEnviv )(GLenum target, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params);
-extern void ( APIENTRY * qglGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetTexGeniv )(GLenum coord, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
-extern void ( APIENTRY * qglGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params);
-extern void ( APIENTRY * qglGetTexParameteriv )(GLenum target, GLenum pname, GLint *params);
-extern void ( APIENTRY * qglHint )(GLenum target, GLenum mode);
-extern void ( APIENTRY * qglIndexMask )(GLuint mask);
-extern void ( APIENTRY * qglIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglIndexd )(GLdouble c);
-extern void ( APIENTRY * qglIndexdv )(const GLdouble *c);
-extern void ( APIENTRY * qglIndexf )(GLfloat c);
-extern void ( APIENTRY * qglIndexfv )(const GLfloat *c);
-extern void ( APIENTRY * qglIndexi )(GLint c);
-extern void ( APIENTRY * qglIndexiv )(const GLint *c);
-extern void ( APIENTRY * qglIndexs )(GLshort c);
-extern void ( APIENTRY * qglIndexsv )(const GLshort *c);
-extern void ( APIENTRY * qglIndexub )(GLubyte c);
-extern void ( APIENTRY * qglIndexubv )(const GLubyte *c);
-extern void ( APIENTRY * qglInitNames )(void);
-extern void ( APIENTRY * qglInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer);
-extern GLboolean ( APIENTRY * qglIsEnabled )(GLenum cap);
-extern GLboolean ( APIENTRY * qglIsList )(GLuint list);
-extern GLboolean ( APIENTRY * qglIsTexture )(GLuint texture);
-extern void ( APIENTRY * qglLightModelf )(GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglLightModelfv )(GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglLightModeli )(GLenum pname, GLint param);
-extern void ( APIENTRY * qglLightModeliv )(GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglLightf )(GLenum light, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglLightfv )(GLenum light, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglLighti )(GLenum light, GLenum pname, GLint param);
-extern void ( APIENTRY * qglLightiv )(GLenum light, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglLineStipple )(GLint factor, GLushort pattern);
-extern void ( APIENTRY * qglLineWidth )(GLfloat width);
-extern void ( APIENTRY * qglListBase )(GLuint base);
-extern void ( APIENTRY * qglLoadIdentity )(void);
-extern void ( APIENTRY * qglLoadMatrixd )(const GLdouble *m);
-extern void ( APIENTRY * qglLoadMatrixf )(const GLfloat *m);
-extern void ( APIENTRY * qglLoadName )(GLuint name);
-extern void ( APIENTRY * qglLogicOp )(GLenum opcode);
-extern void ( APIENTRY * qglMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
-extern void ( APIENTRY * qglMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
-extern void ( APIENTRY * qglMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
-extern void ( APIENTRY * qglMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
-extern void ( APIENTRY * qglMapGrid1d )(GLint un, GLdouble u1, GLdouble u2);
-extern void ( APIENTRY * qglMapGrid1f )(GLint un, GLfloat u1, GLfloat u2);
-extern void ( APIENTRY * qglMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
-extern void ( APIENTRY * qglMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
-extern void ( APIENTRY * qglMaterialf )(GLenum face, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglMaterialfv )(GLenum face, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglMateriali )(GLenum face, GLenum pname, GLint param);
-extern void ( APIENTRY * qglMaterialiv )(GLenum face, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglMatrixMode )(GLenum mode);
-extern void ( APIENTRY * qglMultMatrixd )(const GLdouble *m);
-extern void ( APIENTRY * qglMultMatrixf )(const GLfloat *m);
-extern void ( APIENTRY * qglNewList )(GLuint list, GLenum mode);
-extern void ( APIENTRY * qglNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz);
-extern void ( APIENTRY * qglNormal3bv )(const GLbyte *v);
-extern void ( APIENTRY * qglNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz);
-extern void ( APIENTRY * qglNormal3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz);
-extern void ( APIENTRY * qglNormal3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglNormal3i )(GLint nx, GLint ny, GLint nz);
-extern void ( APIENTRY * qglNormal3iv )(const GLint *v);
-extern void ( APIENTRY * qglNormal3s )(GLshort nx, GLshort ny, GLshort nz);
-extern void ( APIENTRY * qglNormal3sv )(const GLshort *v);
-extern void ( APIENTRY * qglNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-extern void ( APIENTRY * qglPassThrough )(GLfloat token);
-extern void ( APIENTRY * qglPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values);
-extern void ( APIENTRY * qglPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values);
-extern void ( APIENTRY * qglPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values);
-extern void ( APIENTRY * qglPixelStoref )(GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglPixelStorei )(GLenum pname, GLint param);
-extern void ( APIENTRY * qglPixelTransferf )(GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglPixelTransferi )(GLenum pname, GLint param);
-extern void ( APIENTRY * qglPixelZoom )(GLfloat xfactor, GLfloat yfactor);
-extern void ( APIENTRY * qglPointSize )(GLfloat size);
-extern void ( APIENTRY * qglPolygonMode )(GLenum face, GLenum mode);
-extern void ( APIENTRY * qglPolygonOffset )(GLfloat factor, GLfloat units);
-extern void ( APIENTRY * qglPolygonStipple )(const GLubyte *mask);
-extern void ( APIENTRY * qglPopAttrib )(void);
-extern void ( APIENTRY * qglPopClientAttrib )(void);
-extern void ( APIENTRY * qglPopMatrix )(void);
-extern void ( APIENTRY * qglPopName )(void);
-extern void ( APIENTRY * qglPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities);
-extern void ( APIENTRY * qglPushAttrib )(GLbitfield mask);
-extern void ( APIENTRY * qglPushClientAttrib )(GLbitfield mask);
-extern void ( APIENTRY * qglPushMatrix )(void);
-extern void ( APIENTRY * qglPushName )(GLuint name);
-extern void ( APIENTRY * qglRasterPos2d )(GLdouble x, GLdouble y);
-extern void ( APIENTRY * qglRasterPos2dv )(const GLdouble *v);
-extern void ( APIENTRY * qglRasterPos2f )(GLfloat x, GLfloat y);
-extern void ( APIENTRY * qglRasterPos2fv )(const GLfloat *v);
-extern void ( APIENTRY * qglRasterPos2i )(GLint x, GLint y);
-extern void ( APIENTRY * qglRasterPos2iv )(const GLint *v);
-extern void ( APIENTRY * qglRasterPos2s )(GLshort x, GLshort y);
-extern void ( APIENTRY * qglRasterPos2sv )(const GLshort *v);
-extern void ( APIENTRY * qglRasterPos3d )(GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglRasterPos3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglRasterPos3f )(GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglRasterPos3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglRasterPos3i )(GLint x, GLint y, GLint z);
-extern void ( APIENTRY * qglRasterPos3iv )(const GLint *v);
-extern void ( APIENTRY * qglRasterPos3s )(GLshort x, GLshort y, GLshort z);
-extern void ( APIENTRY * qglRasterPos3sv )(const GLshort *v);
-extern void ( APIENTRY * qglRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-extern void ( APIENTRY * qglRasterPos4dv )(const GLdouble *v);
-extern void ( APIENTRY * qglRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-extern void ( APIENTRY * qglRasterPos4fv )(const GLfloat *v);
-extern void ( APIENTRY * qglRasterPos4i )(GLint x, GLint y, GLint z, GLint w);
-extern void ( APIENTRY * qglRasterPos4iv )(const GLint *v);
-extern void ( APIENTRY * qglRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w);
-extern void ( APIENTRY * qglRasterPos4sv )(const GLshort *v);
-extern void ( APIENTRY * qglReadBuffer )(GLenum mode);
-extern void ( APIENTRY * qglReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
-extern void ( APIENTRY * qglRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
-extern void ( APIENTRY * qglRectdv )(const GLdouble *v1, const GLdouble *v2);
-extern void ( APIENTRY * qglRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
-extern void ( APIENTRY * qglRectfv )(const GLfloat *v1, const GLfloat *v2);
-extern void ( APIENTRY * qglRecti )(GLint x1, GLint y1, GLint x2, GLint y2);
-extern void ( APIENTRY * qglRectiv )(const GLint *v1, const GLint *v2);
-extern void ( APIENTRY * qglRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
-extern void ( APIENTRY * qglRectsv )(const GLshort *v1, const GLshort *v2);
-extern GLint ( APIENTRY * qglRenderMode )(GLenum mode);
-extern void ( APIENTRY * qglRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglScaled )(GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglScalef )(GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglScissor )(GLint x, GLint y, GLsizei width, GLsizei height);
-extern void ( APIENTRY * qglSelectBuffer )(GLsizei size, GLuint *buffer);
-extern void ( APIENTRY * qglShadeModel )(GLenum mode);
-extern void ( APIENTRY * qglStencilFunc )(GLenum func, GLint ref, GLuint mask);
-extern void ( APIENTRY * qglStencilMask )(GLuint mask);
-extern void ( APIENTRY * qglStencilOp )(GLenum fail, GLenum zfail, GLenum zpass);
-extern void ( APIENTRY * qglTexCoord1d )(GLdouble s);
-extern void ( APIENTRY * qglTexCoord1dv )(const GLdouble *v);
-extern void ( APIENTRY * qglTexCoord1f )(GLfloat s);
-extern void ( APIENTRY * qglTexCoord1fv )(const GLfloat *v);
-extern void ( APIENTRY * qglTexCoord1i )(GLint s);
-extern void ( APIENTRY * qglTexCoord1iv )(const GLint *v);
-extern void ( APIENTRY * qglTexCoord1s )(GLshort s);
-extern void ( APIENTRY * qglTexCoord1sv )(const GLshort *v);
-extern void ( APIENTRY * qglTexCoord2d )(GLdouble s, GLdouble t);
-extern void ( APIENTRY * qglTexCoord2dv )(const GLdouble *v);
-extern void ( APIENTRY * qglTexCoord2f )(GLfloat s, GLfloat t);
-extern void ( APIENTRY * qglTexCoord2fv )(const GLfloat *v);
-extern void ( APIENTRY * qglTexCoord2i )(GLint s, GLint t);
-extern void ( APIENTRY * qglTexCoord2iv )(const GLint *v);
-extern void ( APIENTRY * qglTexCoord2s )(GLshort s, GLshort t);
-extern void ( APIENTRY * qglTexCoord2sv )(const GLshort *v);
-extern void ( APIENTRY * qglTexCoord3d )(GLdouble s, GLdouble t, GLdouble r);
-extern void ( APIENTRY * qglTexCoord3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglTexCoord3f )(GLfloat s, GLfloat t, GLfloat r);
-extern void ( APIENTRY * qglTexCoord3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglTexCoord3i )(GLint s, GLint t, GLint r);
-extern void ( APIENTRY * qglTexCoord3iv )(const GLint *v);
-extern void ( APIENTRY * qglTexCoord3s )(GLshort s, GLshort t, GLshort r);
-extern void ( APIENTRY * qglTexCoord3sv )(const GLshort *v);
-extern void ( APIENTRY * qglTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-extern void ( APIENTRY * qglTexCoord4dv )(const GLdouble *v);
-extern void ( APIENTRY * qglTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-extern void ( APIENTRY * qglTexCoord4fv )(const GLfloat *v);
-extern void ( APIENTRY * qglTexCoord4i )(GLint s, GLint t, GLint r, GLint q);
-extern void ( APIENTRY * qglTexCoord4iv )(const GLint *v);
-extern void ( APIENTRY * qglTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q);
-extern void ( APIENTRY * qglTexCoord4sv )(const GLshort *v);
-extern void ( APIENTRY * qglTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglTexEnvf )(GLenum target, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglTexEnvi )(GLenum target, GLenum pname, GLint param);
-extern void ( APIENTRY * qglTexEnviv )(GLenum target, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglTexGend )(GLenum coord, GLenum pname, GLdouble param);
-extern void ( APIENTRY * qglTexGendv )(GLenum coord, GLenum pname, const GLdouble *params);
-extern void ( APIENTRY * qglTexGenf )(GLenum coord, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglTexGeni )(GLenum coord, GLenum pname, GLint param);
-extern void ( APIENTRY * qglTexGeniv )(GLenum coord, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglTexParameterf )(GLenum target, GLenum pname, GLfloat param);
-extern void ( APIENTRY * qglTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params);
-extern void ( APIENTRY * qglTexParameteri )(GLenum target, GLenum pname, GLint param);
-extern void ( APIENTRY * qglTexParameteriv )(GLenum target, GLenum pname, const GLint *params);
-extern void ( APIENTRY * qglTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
-extern void ( APIENTRY * qglTranslated )(GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglTranslatef )(GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglVertex2d )(GLdouble x, GLdouble y);
-extern void ( APIENTRY * qglVertex2dv )(const GLdouble *v);
-extern void ( APIENTRY * qglVertex2f )(GLfloat x, GLfloat y);
-extern void ( APIENTRY * qglVertex2fv )(const GLfloat *v);
-extern void ( APIENTRY * qglVertex2i )(GLint x, GLint y);
-extern void ( APIENTRY * qglVertex2iv )(const GLint *v);
-extern void ( APIENTRY * qglVertex2s )(GLshort x, GLshort y);
-extern void ( APIENTRY * qglVertex2sv )(const GLshort *v);
-extern void ( APIENTRY * qglVertex3d )(GLdouble x, GLdouble y, GLdouble z);
-extern void ( APIENTRY * qglVertex3dv )(const GLdouble *v);
-extern void ( APIENTRY * qglVertex3f )(GLfloat x, GLfloat y, GLfloat z);
-extern void ( APIENTRY * qglVertex3fv )(const GLfloat *v);
-extern void ( APIENTRY * qglVertex3i )(GLint x, GLint y, GLint z);
-extern void ( APIENTRY * qglVertex3iv )(const GLint *v);
-extern void ( APIENTRY * qglVertex3s )(GLshort x, GLshort y, GLshort z);
-extern void ( APIENTRY * qglVertex3sv )(const GLshort *v);
-extern void ( APIENTRY * qglVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-extern void ( APIENTRY * qglVertex4dv )(const GLdouble *v);
-extern void ( APIENTRY * qglVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-extern void ( APIENTRY * qglVertex4fv )(const GLfloat *v);
-extern void ( APIENTRY * qglVertex4i )(GLint x, GLint y, GLint z, GLint w);
-extern void ( APIENTRY * qglVertex4iv )(const GLint *v);
-extern void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w);
-extern void ( APIENTRY * qglVertex4sv )(const GLshort *v);
-extern void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-extern void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
-
-#if defined( _WIN32 )
-
-extern int ( WINAPI * qwglChoosePixelFormat )(HDC, CONST PIXELFORMATDESCRIPTOR *);
-extern int ( WINAPI * qwglDescribePixelFormat) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
-extern int ( WINAPI * qwglGetPixelFormat)(HDC);
-extern BOOL ( WINAPI * qwglSetPixelFormat)(HDC, int, CONST PIXELFORMATDESCRIPTOR *);
-extern BOOL ( WINAPI * qwglSwapBuffers)(HDC);
-
-extern BOOL ( WINAPI * qwglGetDeviceGammaRamp3DFX)( HDC, LPVOID );
-extern BOOL ( WINAPI * qwglSetDeviceGammaRamp3DFX)( HDC, LPVOID );
-
-extern BOOL ( WINAPI * qwglCopyContext)(HGLRC, HGLRC, UINT);
-extern HGLRC ( WINAPI * qwglCreateContext)(HDC);
-extern HGLRC ( WINAPI * qwglCreateLayerContext)(HDC, int);
-extern BOOL ( WINAPI * qwglDeleteContext)(HGLRC);
-extern HGLRC ( WINAPI * qwglGetCurrentContext)(VOID);
-extern HDC ( WINAPI * qwglGetCurrentDC)(VOID);
-extern PROC ( WINAPI * qwglGetProcAddress)(LPCSTR);
-extern BOOL ( WINAPI * qwglMakeCurrent)(HDC, HGLRC);
-extern BOOL ( WINAPI * qwglShareLists)(HGLRC, HGLRC);
-extern BOOL ( WINAPI * qwglUseFontBitmaps)(HDC, DWORD, DWORD, DWORD);
-
-extern BOOL ( WINAPI * qwglUseFontOutlines)(HDC, DWORD, DWORD, DWORD, FLOAT,
- FLOAT, int, LPGLYPHMETRICSFLOAT);
-
-extern BOOL ( WINAPI * qwglDescribeLayerPlane)(HDC, int, int, UINT,
- LPLAYERPLANEDESCRIPTOR);
-extern int ( WINAPI * qwglSetLayerPaletteEntries)(HDC, int, int, int,
- CONST COLORREF *);
-extern int ( WINAPI * qwglGetLayerPaletteEntries)(HDC, int, int, int,
- COLORREF *);
-extern BOOL ( WINAPI * qwglRealizeLayerPalette)(HDC, int, BOOL);
-extern BOOL ( WINAPI * qwglSwapLayerBuffers)(HDC, UINT);
-
-extern BOOL ( WINAPI * qwglSwapIntervalEXT)( int interval );
-
-#endif // _WIN32
-
-#if ( (defined __linux__ ) || (defined __FreeBSD__ ) || (defined __sun) ) // rb010123
-
-//FX Mesa Functions
-// bk001129 - from cvs1.17 (mkv)
-#if defined (__FX__)
-extern fxMesaContext (*qfxMesaCreateContext)(GLuint win, GrScreenResolution_t, GrScreenRefresh_t, const GLint attribList[]);
-extern fxMesaContext (*qfxMesaCreateBestContext)(GLuint win, GLint width, GLint height, const GLint attribList[]);
-extern void (*qfxMesaDestroyContext)(fxMesaContext ctx);
-extern void (*qfxMesaMakeCurrent)(fxMesaContext ctx);
-extern fxMesaContext (*qfxMesaGetCurrentContext)(void);
-extern void (*qfxMesaSwapBuffers)(void);
-#endif
-
-//GLX Functions
-extern XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList );
-extern GLXContext (*qglXCreateContext)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
-extern void (*qglXDestroyContext)( Display *dpy, GLXContext ctx );
-extern Bool (*qglXMakeCurrent)( Display *dpy, GLXDrawable drawable, GLXContext ctx);
-extern void (*qglXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, GLuint mask );
-extern void (*qglXSwapBuffers)( Display *dpy, GLXDrawable drawable );
-
-#endif // __linux__ || __FreeBSD__ || __sun // rb010123
-
-#endif // _WIN32 && __linux__
+#define qglAccum glAccum
+#define qglAlphaFunc glAlphaFunc
+#define qglAreTexturesResident glAreTexturesResident
+#define qglArrayElement glArrayElement
+#define qglBegin glBegin
+#define qglBindTexture glBindTexture
+#define qglBitmap glBitmap
+#define qglBlendFunc glBlendFunc
+#define qglCallList glCallList
+#define qglCallLists glCallLists
+#define qglClear glClear
+#define qglClearAccum glClearAccum
+#define qglClearColor glClearColor
+#define qglClearDepth glClearDepth
+#define qglClearIndex glClearIndex
+#define qglClearStencil glClearStencil
+#define qglClipPlane glClipPlane
+#define qglColor3b glColor3b
+#define qglColor3bv glColor3bv
+#define qglColor3d glColor3d
+#define qglColor3dv glColor3dv
+#define qglColor3f glColor3f
+#define qglColor3fv glColor3fv
+#define qglColor3i glColor3i
+#define qglColor3iv glColor3iv
+#define qglColor3s glColor3s
+#define qglColor3sv glColor3sv
+#define qglColor3ub glColor3ub
+#define qglColor3ubv glColor3ubv
+#define qglColor3ui glColor3ui
+#define qglColor3uiv glColor3uiv
+#define qglColor3us glColor3us
+#define qglColor3usv glColor3usv
+#define qglColor4b glColor4b
+#define qglColor4bv glColor4bv
+#define qglColor4d glColor4d
+#define qglColor4dv glColor4dv
+#define qglColor4f glColor4f
+#define qglColor4fv glColor4fv
+#define qglColor4i glColor4i
+#define qglColor4iv glColor4iv
+#define qglColor4s glColor4s
+#define qglColor4sv glColor4sv
+#define qglColor4ub glColor4ub
+#define qglColor4ubv glColor4ubv
+#define qglColor4ui glColor4ui
+#define qglColor4uiv glColor4uiv
+#define qglColor4us glColor4us
+#define qglColor4usv glColor4usv
+#define qglColorMask glColorMask
+#define qglColorMaterial glColorMaterial
+#define qglColorPointer glColorPointer
+#define qglCopyPixels glCopyPixels
+#define qglCopyTexImage1D glCopyTexImage1D
+#define qglCopyTexImage2D glCopyTexImage2D
+#define qglCopyTexSubImage1D glCopyTexSubImage1D
+#define qglCopyTexSubImage2D glCopyTexSubImage2D
+#define qglCullFace glCullFace
+#define qglDeleteLists glDeleteLists
+#define qglDeleteTextures glDeleteTextures
+#define qglDepthFunc glDepthFunc
+#define qglDepthMask glDepthMask
+#define qglDepthRange glDepthRange
+#define qglDisable glDisable
+#define qglDisableClientState glDisableClientState
+#define qglDrawArrays glDrawArrays
+#define qglDrawBuffer glDrawBuffer
+#define qglDrawElements glDrawElements
+#define qglDrawPixels glDrawPixels
+#define qglEdgeFlag glEdgeFlag
+#define qglEdgeFlagPointer glEdgeFlagPointer
+#define qglEdgeFlagv glEdgeFlagv
+#define qglEnable glEnable
+#define qglEnableClientState glEnableClientState
+#define qglEnd glEnd
+#define qglEndList glEndList
+#define qglEvalCoord1d glEvalCoord1d
+#define qglEvalCoord1dv glEvalCoord1dv
+#define qglEvalCoord1f glEvalCoord1f
+#define qglEvalCoord1fv glEvalCoord1fv
+#define qglEvalCoord2d glEvalCoord2d
+#define qglEvalCoord2dv glEvalCoord2dv
+#define qglEvalCoord2f glEvalCoord2f
+#define qglEvalCoord2fv glEvalCoord2fv
+#define qglEvalMesh1 glEvalMesh1
+#define qglEvalMesh2 glEvalMesh2
+#define qglEvalPoint1 glEvalPoint1
+#define qglEvalPoint2 glEvalPoint2
+#define qglFeedbackBuffer glFeedbackBuffer
+#define qglFinish glFinish
+#define qglFlush glFlush
+#define qglFogf glFogf
+#define qglFogfv glFogfv
+#define qglFogi glFogi
+#define qglFogiv glFogiv
+#define qglFrontFace glFrontFace
+#define qglFrustum glFrustum
+#define qglGenLists glGenLists
+#define qglGenTextures glGenTextures
+#define qglGetBooleanv glGetBooleanv
+#define qglGetClipPlane glGetClipPlane
+#define qglGetDoublev glGetDoublev
+#define qglGetError glGetError
+#define qglGetFloatv glGetFloatv
+#define qglGetIntegerv glGetIntegerv
+#define qglGetLightfv glGetLightfv
+#define qglGetLightiv glGetLightiv
+#define qglGetMapdv glGetMapdv
+#define qglGetMapfv glGetMapfv
+#define qglGetMapiv glGetMapiv
+#define qglGetMaterialfv glGetMaterialfv
+#define qglGetMaterialiv glGetMaterialiv
+#define qglGetPixelMapfv glGetPixelMapfv
+#define qglGetPixelMapuiv glGetPixelMapuiv
+#define qglGetPixelMapusv glGetPixelMapusv
+#define qglGetPointerv glGetPointerv
+#define qglGetPolygonStipple glGetPolygonStipple
+#define qglGetString glGetString
+#define qglGetTexGendv glGetTexGendv
+#define qglGetTexGenfv glGetTexGenfv
+#define qglGetTexGeniv glGetTexGeniv
+#define qglGetTexImage glGetTexImage
+#define qglGetTexLevelParameterfv glGetTexLevelParameterfv
+#define qglGetTexLevelParameteriv glGetTexLevelParameteriv
+#define qglGetTexParameterfv glGetTexParameterfv
+#define qglGetTexParameteriv glGetTexParameteriv
+#define qglHint glHint
+#define qglIndexMask glIndexMask
+#define qglIndexPointer glIndexPointer
+#define qglIndexd glIndexd
+#define qglIndexdv glIndexdv
+#define qglIndexf glIndexf
+#define qglIndexfv glIndexfv
+#define qglIndexi glIndexi
+#define qglIndexiv glIndexiv
+#define qglIndexs glIndexs
+#define qglIndexsv glIndexsv
+#define qglIndexub glIndexub
+#define qglIndexubv glIndexubv
+#define qglInitNames glInitNames
+#define qglInterleavedArrays glInterleavedArrays
+#define qglIsEnabled glIsEnabled
+#define qglIsList glIsList
+#define qglIsTexture glIsTexture
+#define qglLightModelf glLightModelf
+#define qglLightModelfv glLightModelfv
+#define qglLightModeli glLightModeli
+#define qglLightModeliv glLightModeliv
+#define qglLightf glLightf
+#define qglLightfv glLightfv
+#define qglLighti glLighti
+#define qglLightiv glLightiv
+#define qglLineStipple glLineStipple
+#define qglLineWidth glLineWidth
+#define qglListBase glListBase
+#define qglLoadIdentity glLoadIdentity
+#define qglLoadMatrixd glLoadMatrixd
+#define qglLoadMatrixf glLoadMatrixf
+#define qglLoadName glLoadName
+#define qglLogicOp glLogicOp
+#define qglMap1d glMap1d
+#define qglMap1f glMap1f
+#define qglMap2d glMap2d
+#define qglMap2f glMap2f
+#define qglMapGrid1d glMapGrid1d
+#define qglMapGrid1f glMapGrid1f
+#define qglMapGrid2d glMapGrid2d
+#define qglMapGrid2f glMapGrid2f
+#define qglMaterialf glMaterialf
+#define qglMaterialfv glMaterialfv
+#define qglMateriali glMateriali
+#define qglMaterialiv glMaterialiv
+#define qglMatrixMode glMatrixMode
+#define qglMultMatrixd glMultMatrixd
+#define qglMultMatrixf glMultMatrixf
+#define qglNewList glNewList
+#define qglNormal3b glNormal3b
+#define qglNormal3bv glNormal3bv
+#define qglNormal3d glNormal3d
+#define qglNormal3dv glNormal3dv
+#define qglNormal3f glNormal3f
+#define qglNormal3fv glNormal3fv
+#define qglNormal3i glNormal3i
+#define qglNormal3iv glNormal3iv
+#define qglNormal3s glNormal3s
+#define qglNormal3sv glNormal3sv
+#define qglNormalPointer glNormalPointer
+#define qglOrtho glOrtho
+#define qglPassThrough glPassThrough
+#define qglPixelMapfv glPixelMapfv
+#define qglPixelMapuiv glPixelMapuiv
+#define qglPixelMapusv glPixelMapusv
+#define qglPixelStoref glPixelStoref
+#define qglPixelStorei glPixelStorei
+#define qglPixelTransferf glPixelTransferf
+#define qglPixelTransferi glPixelTransferi
+#define qglPixelZoom glPixelZoom
+#define qglPointSize glPointSize
+#define qglPolygonMode glPolygonMode
+#define qglPolygonOffset glPolygonOffset
+#define qglPolygonStipple glPolygonStipple
+#define qglPopAttrib glPopAttrib
+#define qglPopClientAttrib glPopClientAttrib
+#define qglPopMatrix glPopMatrix
+#define qglPopName glPopName
+#define qglPrioritizeTextures glPrioritizeTextures
+#define qglPushAttrib glPushAttrib
+#define qglPushClientAttrib glPushClientAttrib
+#define qglPushMatrix glPushMatrix
+#define qglPushName glPushName
+#define qglRasterPos2d glRasterPos2d
+#define qglRasterPos2dv glRasterPos2dv
+#define qglRasterPos2f glRasterPos2f
+#define qglRasterPos2fv glRasterPos2fv
+#define qglRasterPos2i glRasterPos2i
+#define qglRasterPos2iv glRasterPos2iv
+#define qglRasterPos2s glRasterPos2s
+#define qglRasterPos2sv glRasterPos2sv
+#define qglRasterPos3d glRasterPos3d
+#define qglRasterPos3dv glRasterPos3dv
+#define qglRasterPos3f glRasterPos3f
+#define qglRasterPos3fv glRasterPos3fv
+#define qglRasterPos3i glRasterPos3i
+#define qglRasterPos3iv glRasterPos3iv
+#define qglRasterPos3s glRasterPos3s
+#define qglRasterPos3sv glRasterPos3sv
+#define qglRasterPos4d glRasterPos4d
+#define qglRasterPos4dv glRasterPos4dv
+#define qglRasterPos4f glRasterPos4f
+#define qglRasterPos4fv glRasterPos4fv
+#define qglRasterPos4i glRasterPos4i
+#define qglRasterPos4iv glRasterPos4iv
+#define qglRasterPos4s glRasterPos4s
+#define qglRasterPos4sv glRasterPos4sv
+#define qglReadBuffer glReadBuffer
+#define qglReadPixels glReadPixels
+#define qglRectd glRectd
+#define qglRectdv glRectdv
+#define qglRectf glRectf
+#define qglRectfv glRectfv
+#define qglRecti glRecti
+#define qglRectiv glRectiv
+#define qglRects glRects
+#define qglRectsv glRectsv
+#define qglRenderMode glRenderMode
+#define qglRotated glRotated
+#define qglRotatef glRotatef
+#define qglScaled glScaled
+#define qglScalef glScalef
+#define qglScissor glScissor
+#define qglSelectBuffer glSelectBuffer
+#define qglShadeModel glShadeModel
+#define qglStencilFunc glStencilFunc
+#define qglStencilMask glStencilMask
+#define qglStencilOp glStencilOp
+#define qglTexCoord1d glTexCoord1d
+#define qglTexCoord1dv glTexCoord1dv
+#define qglTexCoord1f glTexCoord1f
+#define qglTexCoord1fv glTexCoord1fv
+#define qglTexCoord1i glTexCoord1i
+#define qglTexCoord1iv glTexCoord1iv
+#define qglTexCoord1s glTexCoord1s
+#define qglTexCoord1sv glTexCoord1sv
+#define qglTexCoord2d glTexCoord2d
+#define qglTexCoord2dv glTexCoord2dv
+#define qglTexCoord2f glTexCoord2f
+#define qglTexCoord2fv glTexCoord2fv
+#define qglTexCoord2i glTexCoord2i
+#define qglTexCoord2iv glTexCoord2iv
+#define qglTexCoord2s glTexCoord2s
+#define qglTexCoord2sv glTexCoord2sv
+#define qglTexCoord3d glTexCoord3d
+#define qglTexCoord3dv glTexCoord3dv
+#define qglTexCoord3f glTexCoord3f
+#define qglTexCoord3fv glTexCoord3fv
+#define qglTexCoord3i glTexCoord3i
+#define qglTexCoord3iv glTexCoord3iv
+#define qglTexCoord3s glTexCoord3s
+#define qglTexCoord3sv glTexCoord3sv
+#define qglTexCoord4d glTexCoord4d
+#define qglTexCoord4dv glTexCoord4dv
+#define qglTexCoord4f glTexCoord4f
+#define qglTexCoord4fv glTexCoord4fv
+#define qglTexCoord4i glTexCoord4i
+#define qglTexCoord4iv glTexCoord4iv
+#define qglTexCoord4s glTexCoord4s
+#define qglTexCoord4sv glTexCoord4sv
+#define qglTexCoordPointer glTexCoordPointer
+#define qglTexEnvf glTexEnvf
+#define qglTexEnvfv glTexEnvfv
+#define qglTexEnvi glTexEnvi
+#define qglTexEnviv glTexEnviv
+#define qglTexGend glTexGend
+#define qglTexGendv glTexGendv
+#define qglTexGenf glTexGenf
+#define qglTexGenfv glTexGenfv
+#define qglTexGeni glTexGeni
+#define qglTexGeniv glTexGeniv
+#define qglTexImage1D glTexImage1D
+#define qglTexImage2D glTexImage2D
+#define qglTexParameterf glTexParameterf
+#define qglTexParameterfv glTexParameterfv
+#define qglTexParameteri glTexParameteri
+#define qglTexParameteriv glTexParameteriv
+#define qglTexSubImage1D glTexSubImage1D
+#define qglTexSubImage2D glTexSubImage2D
+#define qglTranslated glTranslated
+#define qglTranslatef glTranslatef
+#define qglVertex2d glVertex2d
+#define qglVertex2dv glVertex2dv
+#define qglVertex2f glVertex2f
+#define qglVertex2fv glVertex2fv
+#define qglVertex2i glVertex2i
+#define qglVertex2iv glVertex2iv
+#define qglVertex2s glVertex2s
+#define qglVertex2sv glVertex2sv
+#define qglVertex3d glVertex3d
+#define qglVertex3dv glVertex3dv
+#define qglVertex3f glVertex3f
+#define qglVertex3fv glVertex3fv
+#define qglVertex3i glVertex3i
+#define qglVertex3iv glVertex3iv
+#define qglVertex3s glVertex3s
+#define qglVertex3sv glVertex3sv
+#define qglVertex4d glVertex4d
+#define qglVertex4dv glVertex4dv
+#define qglVertex4f glVertex4f
+#define qglVertex4fv glVertex4fv
+#define qglVertex4i glVertex4i
+#define qglVertex4iv glVertex4iv
+#define qglVertex4s glVertex4s
+#define qglVertex4sv glVertex4sv
+#define qglVertexPointer glVertexPointer
+#define qglViewport glViewport
#endif
diff --git a/code/renderer/qgl_linked.h b/code/renderer/qgl_linked.h
deleted file mode 100644
index 3d11f4a..0000000
--- a/code/renderer/qgl_linked.h
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
-===========================================================================
-Copyright (C) 1999-2005 Id Software, Inc.
-
-This file is part of Quake III Arena source code.
-
-Quake III Arena source code is free software; you can redistribute it
-and/or modify it under the terms of the GNU General Public License as
-published by the Free Software Foundation; either version 2 of the License,
-or (at your option) any later version.
-
-Quake III Arena source code is distributed in the hope that it will be
-useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Quake III Arena source code; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-===========================================================================
-*/
-
-#define qglAccum glAccum
-#define qglAlphaFunc glAlphaFunc
-#define qglAreTexturesResident glAreTexturesResident
-#define qglArrayElement glArrayElement
-#define qglBegin glBegin
-#define qglBindTexture glBindTexture
-#define qglBitmap glBitmap
-#define qglBlendFunc glBlendFunc
-#define qglCallList glCallList
-#define qglCallLists glCallLists
-#define qglClear glClear
-#define qglClearAccum glClearAccum
-#define qglClearColor glClearColor
-#define qglClearDepth glClearDepth
-#define qglClearIndex glClearIndex
-#define qglClearStencil glClearStencil
-#define qglClipPlane glClipPlane
-#define qglColor3b glColor3b
-#define qglColor3bv glColor3bv
-#define qglColor3d glColor3d
-#define qglColor3dv glColor3dv
-#define qglColor3f glColor3f
-#define qglColor3fv glColor3fv
-#define qglColor3i glColor3i
-#define qglColor3iv glColor3iv
-#define qglColor3s glColor3s
-#define qglColor3sv glColor3sv
-#define qglColor3ub glColor3ub
-#define qglColor3ubv glColor3ubv
-#define qglColor3ui glColor3ui
-#define qglColor3uiv glColor3uiv
-#define qglColor3us glColor3us
-#define qglColor3usv glColor3usv
-#define qglColor4b glColor4b
-#define qglColor4bv glColor4bv
-#define qglColor4d glColor4d
-#define qglColor4dv glColor4dv
-#define qglColor4f glColor4f
-#define qglColor4fv glColor4fv
-#define qglColor4i glColor4i
-#define qglColor4iv glColor4iv
-#define qglColor4s glColor4s
-#define qglColor4sv glColor4sv
-#define qglColor4ub glColor4ub
-#define qglColor4ubv glColor4ubv
-#define qglColor4ui glColor4ui
-#define qglColor4uiv glColor4uiv
-#define qglColor4us glColor4us
-#define qglColor4usv glColor4usv
-#define qglColorMask glColorMask
-#define qglColorMaterial glColorMaterial
-#define qglColorPointer glColorPointer
-#define qglCopyPixels glCopyPixels
-#define qglCopyTexImage1D glCopyTexImage1D
-#define qglCopyTexImage2D glCopyTexImage2D
-#define qglCopyTexSubImage1D glCopyTexSubImage1D
-#define qglCopyTexSubImage2D glCopyTexSubImage2D
-#define qglCullFace glCullFace
-#define qglDeleteLists glDeleteLists
-#define qglDeleteTextures glDeleteTextures
-#define qglDepthFunc glDepthFunc
-#define qglDepthMask glDepthMask
-#define qglDepthRange glDepthRange
-#define qglDisable glDisable
-#define qglDisableClientState glDisableClientState
-#define qglDrawArrays glDrawArrays
-#define qglDrawBuffer glDrawBuffer
-#define qglDrawElements glDrawElements
-#define qglDrawPixels glDrawPixels
-#define qglEdgeFlag glEdgeFlag
-#define qglEdgeFlagPointer glEdgeFlagPointer
-#define qglEdgeFlagv glEdgeFlagv
-#define qglEnable glEnable
-#define qglEnableClientState glEnableClientState
-#define qglEnd glEnd
-#define qglEndList glEndList
-#define qglEvalCoord1d glEvalCoord1d
-#define qglEvalCoord1dv glEvalCoord1dv
-#define qglEvalCoord1f glEvalCoord1f
-#define qglEvalCoord1fv glEvalCoord1fv
-#define qglEvalCoord2d glEvalCoord2d
-#define qglEvalCoord2dv glEvalCoord2dv
-#define qglEvalCoord2f glEvalCoord2f
-#define qglEvalCoord2fv glEvalCoord2fv
-#define qglEvalMesh1 glEvalMesh1
-#define qglEvalMesh2 glEvalMesh2
-#define qglEvalPoint1 glEvalPoint1
-#define qglEvalPoint2 glEvalPoint2
-#define qglFeedbackBuffer glFeedbackBuffer
-#define qglFinish glFinish
-#define qglFlush glFlush
-#define qglFogf glFogf
-#define qglFogfv glFogfv
-#define qglFogi glFogi
-#define qglFogiv glFogiv
-#define qglFrontFace glFrontFace
-#define qglFrustum glFrustum
-#define qglGenLists glGenLists
-#define qglGenTextures glGenTextures
-#define qglGetBooleanv glGetBooleanv
-#define qglGetClipPlane glGetClipPlane
-#define qglGetDoublev glGetDoublev
-#define qglGetError glGetError
-#define qglGetFloatv glGetFloatv
-#define qglGetIntegerv glGetIntegerv
-#define qglGetLightfv glGetLightfv
-#define qglGetLightiv glGetLightiv
-#define qglGetMapdv glGetMapdv
-#define qglGetMapfv glGetMapfv
-#define qglGetMapiv glGetMapiv
-#define qglGetMaterialfv glGetMaterialfv
-#define qglGetMaterialiv glGetMaterialiv
-#define qglGetPixelMapfv glGetPixelMapfv
-#define qglGetPixelMapuiv glGetPixelMapuiv
-#define qglGetPixelMapusv glGetPixelMapusv
-#define qglGetPointerv glGetPointerv
-#define qglGetPolygonStipple glGetPolygonStipple
-#define qglGetString glGetString
-#define qglGetTexGendv glGetTexGendv
-#define qglGetTexGenfv glGetTexGenfv
-#define qglGetTexGeniv glGetTexGeniv
-#define qglGetTexImage glGetTexImage
-#define qglGetTexLevelParameterfv glGetTexLevelParameterfv
-#define qglGetTexLevelParameteriv glGetTexLevelParameteriv
-#define qglGetTexParameterfv glGetTexParameterfv
-#define qglGetTexParameteriv glGetTexParameteriv
-#define qglHint glHint
-#define qglIndexMask glIndexMask
-#define qglIndexPointer glIndexPointer
-#define qglIndexd glIndexd
-#define qglIndexdv glIndexdv
-#define qglIndexf glIndexf
-#define qglIndexfv glIndexfv
-#define qglIndexi glIndexi
-#define qglIndexiv glIndexiv
-#define qglIndexs glIndexs
-#define qglIndexsv glIndexsv
-#define qglIndexub glIndexub
-#define qglIndexubv glIndexubv
-#define qglInitNames glInitNames
-#define qglInterleavedArrays glInterleavedArrays
-#define qglIsEnabled glIsEnabled
-#define qglIsList glIsList
-#define qglIsTexture glIsTexture
-#define qglLightModelf glLightModelf
-#define qglLightModelfv glLightModelfv
-#define qglLightModeli glLightModeli
-#define qglLightModeliv glLightModeliv
-#define qglLightf glLightf
-#define qglLightfv glLightfv
-#define qglLighti glLighti
-#define qglLightiv glLightiv
-#define qglLineStipple glLineStipple
-#define qglLineWidth glLineWidth
-#define qglListBase glListBase
-#define qglLoadIdentity glLoadIdentity
-#define qglLoadMatrixd glLoadMatrixd
-#define qglLoadMatrixf glLoadMatrixf
-#define qglLoadName glLoadName
-#define qglLogicOp glLogicOp
-#define qglMap1d glMap1d
-#define qglMap1f glMap1f
-#define qglMap2d glMap2d
-#define qglMap2f glMap2f
-#define qglMapGrid1d glMapGrid1d
-#define qglMapGrid1f glMapGrid1f
-#define qglMapGrid2d glMapGrid2d
-#define qglMapGrid2f glMapGrid2f
-#define qglMaterialf glMaterialf
-#define qglMaterialfv glMaterialfv
-#define qglMateriali glMateriali
-#define qglMaterialiv glMaterialiv
-#define qglMatrixMode glMatrixMode
-#define qglMultMatrixd glMultMatrixd
-#define qglMultMatrixf glMultMatrixf
-#define qglNewList glNewList
-#define qglNormal3b glNormal3b
-#define qglNormal3bv glNormal3bv
-#define qglNormal3d glNormal3d
-#define qglNormal3dv glNormal3dv
-#define qglNormal3f glNormal3f
-#define qglNormal3fv glNormal3fv
-#define qglNormal3i glNormal3i
-#define qglNormal3iv glNormal3iv
-#define qglNormal3s glNormal3s
-#define qglNormal3sv glNormal3sv
-#define qglNormalPointer glNormalPointer
-#define qglOrtho glOrtho
-#define qglPassThrough glPassThrough
-#define qglPixelMapfv glPixelMapfv
-#define qglPixelMapuiv glPixelMapuiv
-#define qglPixelMapusv glPixelMapusv
-#define qglPixelStoref glPixelStoref
-#define qglPixelStorei glPixelStorei
-#define qglPixelTransferf glPixelTransferf
-#define qglPixelTransferi glPixelTransferi
-#define qglPixelZoom glPixelZoom
-#define qglPointSize glPointSize
-#define qglPolygonMode glPolygonMode
-#define qglPolygonOffset glPolygonOffset
-#define qglPolygonStipple glPolygonStipple
-#define qglPopAttrib glPopAttrib
-#define qglPopClientAttrib glPopClientAttrib
-#define qglPopMatrix glPopMatrix
-#define qglPopName glPopName
-#define qglPrioritizeTextures glPrioritizeTextures
-#define qglPushAttrib glPushAttrib
-#define qglPushClientAttrib glPushClientAttrib
-#define qglPushMatrix glPushMatrix
-#define qglPushName glPushName
-#define qglRasterPos2d glRasterPos2d
-#define qglRasterPos2dv glRasterPos2dv
-#define qglRasterPos2f glRasterPos2f
-#define qglRasterPos2fv glRasterPos2fv
-#define qglRasterPos2i glRasterPos2i
-#define qglRasterPos2iv glRasterPos2iv
-#define qglRasterPos2s glRasterPos2s
-#define qglRasterPos2sv glRasterPos2sv
-#define qglRasterPos3d glRasterPos3d
-#define qglRasterPos3dv glRasterPos3dv
-#define qglRasterPos3f glRasterPos3f
-#define qglRasterPos3fv glRasterPos3fv
-#define qglRasterPos3i glRasterPos3i
-#define qglRasterPos3iv glRasterPos3iv
-#define qglRasterPos3s glRasterPos3s
-#define qglRasterPos3sv glRasterPos3sv
-#define qglRasterPos4d glRasterPos4d
-#define qglRasterPos4dv glRasterPos4dv
-#define qglRasterPos4f glRasterPos4f
-#define qglRasterPos4fv glRasterPos4fv
-#define qglRasterPos4i glRasterPos4i
-#define qglRasterPos4iv glRasterPos4iv
-#define qglRasterPos4s glRasterPos4s
-#define qglRasterPos4sv glRasterPos4sv
-#define qglReadBuffer glReadBuffer
-#define qglReadPixels glReadPixels
-#define qglRectd glRectd
-#define qglRectdv glRectdv
-#define qglRectf glRectf
-#define qglRectfv glRectfv
-#define qglRecti glRecti
-#define qglRectiv glRectiv
-#define qglRects glRects
-#define qglRectsv glRectsv
-#define qglRenderMode glRenderMode
-#define qglRotated glRotated
-#define qglRotatef glRotatef
-#define qglScaled glScaled
-#define qglScalef glScalef
-#define qglScissor glScissor
-#define qglSelectBuffer glSelectBuffer
-#define qglShadeModel glShadeModel
-#define qglStencilFunc glStencilFunc
-#define qglStencilMask glStencilMask
-#define qglStencilOp glStencilOp
-#define qglTexCoord1d glTexCoord1d
-#define qglTexCoord1dv glTexCoord1dv
-#define qglTexCoord1f glTexCoord1f
-#define qglTexCoord1fv glTexCoord1fv
-#define qglTexCoord1i glTexCoord1i
-#define qglTexCoord1iv glTexCoord1iv
-#define qglTexCoord1s glTexCoord1s
-#define qglTexCoord1sv glTexCoord1sv
-#define qglTexCoord2d glTexCoord2d
-#define qglTexCoord2dv glTexCoord2dv
-#define qglTexCoord2f glTexCoord2f
-#define qglTexCoord2fv glTexCoord2fv
-#define qglTexCoord2i glTexCoord2i
-#define qglTexCoord2iv glTexCoord2iv
-#define qglTexCoord2s glTexCoord2s
-#define qglTexCoord2sv glTexCoord2sv
-#define qglTexCoord3d glTexCoord3d
-#define qglTexCoord3dv glTexCoord3dv
-#define qglTexCoord3f glTexCoord3f
-#define qglTexCoord3fv glTexCoord3fv
-#define qglTexCoord3i glTexCoord3i
-#define qglTexCoord3iv glTexCoord3iv
-#define qglTexCoord3s glTexCoord3s
-#define qglTexCoord3sv glTexCoord3sv
-#define qglTexCoord4d glTexCoord4d
-#define qglTexCoord4dv glTexCoord4dv
-#define qglTexCoord4f glTexCoord4f
-#define qglTexCoord4fv glTexCoord4fv
-#define qglTexCoord4i glTexCoord4i
-#define qglTexCoord4iv glTexCoord4iv
-#define qglTexCoord4s glTexCoord4s
-#define qglTexCoord4sv glTexCoord4sv
-#define qglTexCoordPointer glTexCoordPointer
-#define qglTexEnvf glTexEnvf
-#define qglTexEnvfv glTexEnvfv
-#define qglTexEnvi glTexEnvi
-#define qglTexEnviv glTexEnviv
-#define qglTexGend glTexGend
-#define qglTexGendv glTexGendv
-#define qglTexGenf glTexGenf
-#define qglTexGenfv glTexGenfv
-#define qglTexGeni glTexGeni
-#define qglTexGeniv glTexGeniv
-#define qglTexImage1D glTexImage1D
-#define qglTexImage2D glTexImage2D
-#define qglTexParameterf glTexParameterf
-#define qglTexParameterfv glTexParameterfv
-#define qglTexParameteri glTexParameteri
-#define qglTexParameteriv glTexParameteriv
-#define qglTexSubImage1D glTexSubImage1D
-#define qglTexSubImage2D glTexSubImage2D
-#define qglTranslated glTranslated
-#define qglTranslatef glTranslatef
-#define qglVertex2d glVertex2d
-#define qglVertex2dv glVertex2dv
-#define qglVertex2f glVertex2f
-#define qglVertex2fv glVertex2fv
-#define qglVertex2i glVertex2i
-#define qglVertex2iv glVertex2iv
-#define qglVertex2s glVertex2s
-#define qglVertex2sv glVertex2sv
-#define qglVertex3d glVertex3d
-#define qglVertex3dv glVertex3dv
-#define qglVertex3f glVertex3f
-#define qglVertex3fv glVertex3fv
-#define qglVertex3i glVertex3i
-#define qglVertex3iv glVertex3iv
-#define qglVertex3s glVertex3s
-#define qglVertex3sv glVertex3sv
-#define qglVertex4d glVertex4d
-#define qglVertex4dv glVertex4dv
-#define qglVertex4f glVertex4f
-#define qglVertex4fv glVertex4fv
-#define qglVertex4i glVertex4i
-#define qglVertex4iv glVertex4iv
-#define qglVertex4s glVertex4s
-#define qglVertex4sv glVertex4sv
-#define qglVertexPointer glVertexPointer
-#define qglViewport glViewport
-
diff --git a/code/renderer/tr_cmds.c b/code/renderer/tr_cmds.c
index 3be865c..318a196 100644
--- a/code/renderer/tr_cmds.c
+++ b/code/renderer/tr_cmds.c
@@ -118,7 +118,7 @@ void R_IssueRenderCommands( qboolean runPerformanceCounters ) {
renderCommandList_t *cmdList;
cmdList = &backEndData[tr.smpFrame]->commands;
- assert(cmdList); // bk001205
+ assert(cmdList);
// add an end-of-list command
*(int *)(cmdList->cmds + cmdList->used) = RC_END_OF_LIST;
diff --git a/code/renderer/tr_image.c b/code/renderer/tr_image.c
index 016b6f0..37b91c2 100644
--- a/code/renderer/tr_image.c
+++ b/code/renderer/tr_image.c
@@ -1358,7 +1358,6 @@ static void LoadTGA ( const char *name, byte **pic, int *width, int *height)
#if 0
// TTimo: this is the chunk of code to ensure a behavior that meets TGA specs
- // bk0101024 - fix from Leonardo
// bit 5 set => top-down
if (targa_header.attributes & 0x20) {
unsigned char *flip = (unsigned char*)malloc (columns*4);
@@ -4850,15 +4849,13 @@ void R_DeleteTextures( void ) {
tr.numImages = 0;
Com_Memset( glState.currenttextures, 0, sizeof( glState.currenttextures ) );
- if ( qglBindTexture ) {
- if ( qglActiveTextureARB ) {
- GL_SelectTexture( 1 );
- qglBindTexture( GL_TEXTURE_2D, 0 );
- GL_SelectTexture( 0 );
- qglBindTexture( GL_TEXTURE_2D, 0 );
- } else {
- qglBindTexture( GL_TEXTURE_2D, 0 );
- }
+ if ( qglActiveTextureARB ) {
+ GL_SelectTexture( 1 );
+ qglBindTexture( GL_TEXTURE_2D, 0 );
+ GL_SelectTexture( 0 );
+ qglBindTexture( GL_TEXTURE_2D, 0 );
+ } else {
+ qglBindTexture( GL_TEXTURE_2D, 0 );
}
}
diff --git a/code/renderer/tr_init.c b/code/renderer/tr_init.c
index 0434d2a..76e0a9d 100644
--- a/code/renderer/tr_init.c
+++ b/code/renderer/tr_init.c
@@ -98,7 +98,6 @@ cvar_t *r_primitives;
cvar_t *r_texturebits;
cvar_t *r_drawBuffer;
-cvar_t *r_glDriver;
cvar_t *r_lightmap;
cvar_t *r_vertexLight;
cvar_t *r_uiFullScreen;
@@ -149,8 +148,6 @@ cvar_t *r_debugSort;
cvar_t *r_printShaders;
cvar_t *r_saveFontData;
-cvar_t *r_GLlibCoolDownMsec;
-
cvar_t *r_maxpolys;
int max_polys;
cvar_t *r_maxpolyverts;
@@ -197,7 +194,6 @@ static void InitOpenGL( void )
//
// GLimp_Init directly or indirectly references the following cvars:
// - r_fullscreen
- // - r_glDriver
// - r_mode
// - r_(color|depth|stencil)bits
// - r_ignorehwgamma
@@ -905,7 +901,6 @@ void R_Register( void )
//
// latched and archived variables
//
- r_glDriver = ri.Cvar_Get( "r_glDriver", OPENGL_DRIVER_NAME, CVAR_ARCHIVE | CVAR_LATCH );
r_allowExtensions = ri.Cvar_Get( "r_allowExtensions", "1", CVAR_ARCHIVE | CVAR_LATCH );
r_ext_compressed_textures = ri.Cvar_Get( "r_ext_compressed_textures", "0", CVAR_ARCHIVE | CVAR_LATCH );
r_ext_gamma_control = ri.Cvar_Get( "r_ext_gamma_control", "1", CVAR_ARCHIVE | CVAR_LATCH );
@@ -938,11 +933,7 @@ void R_Register( void )
r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE | CVAR_LATCH );
r_ignorehwgamma = ri.Cvar_Get( "r_ignorehwgamma", "0", CVAR_ARCHIVE | CVAR_LATCH);
r_mode = ri.Cvar_Get( "r_mode", "3", CVAR_ARCHIVE | CVAR_LATCH );
-#if USE_SDL_VIDEO
r_fullscreen = ri.Cvar_Get( "r_fullscreen", "1", CVAR_ARCHIVE );
-#else
- r_fullscreen = ri.Cvar_Get( "r_fullscreen", "1", CVAR_ARCHIVE | CVAR_LATCH );
-#endif
r_customwidth = ri.Cvar_Get( "r_customwidth", "1600", CVAR_ARCHIVE | CVAR_LATCH );
r_customheight = ri.Cvar_Get( "r_customheight", "1024", CVAR_ARCHIVE | CVAR_LATCH );
r_customPixelAspect = ri.Cvar_Get( "r_customPixelAspect", "1", CVAR_ARCHIVE | CVAR_LATCH );
@@ -979,12 +970,8 @@ void R_Register( void )
r_dlightBacks = ri.Cvar_Get( "r_dlightBacks", "1", CVAR_ARCHIVE );
r_finish = ri.Cvar_Get ("r_finish", "0", CVAR_ARCHIVE);
r_textureMode = ri.Cvar_Get( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST", CVAR_ARCHIVE );
-#if USE_SDL_VIDEO
r_swapInterval = ri.Cvar_Get( "r_swapInterval", "0",
CVAR_ARCHIVE | CVAR_LATCH );
-#else
- r_swapInterval = ri.Cvar_Get( "r_swapInterval", "0", CVAR_ARCHIVE );
-#endif
r_gamma = ri.Cvar_Get( "r_gamma", "1", CVAR_ARCHIVE );
r_facePlaneCull = ri.Cvar_Get ("r_facePlaneCull", "1", CVAR_ARCHIVE );
@@ -1046,8 +1033,6 @@ void R_Register( void )
r_maxpolys = ri.Cvar_Get( "r_maxpolys", va("%d", MAX_POLYS), 0);
r_maxpolyverts = ri.Cvar_Get( "r_maxpolyverts", va("%d", MAX_POLYVERTS), 0);
- r_GLlibCoolDownMsec = ri.Cvar_Get( "r_GLlibCoolDownMsec", "0", CVAR_ARCHIVE );
-
// make sure all the commands added here are also
// removed in R_Shutdown
ri.Cmd_AddCommand( "imagelist", R_ImageList_f );
diff --git a/code/renderer/tr_light.c b/code/renderer/tr_light.c
index c21ade7..4cc9cf2 100644
--- a/code/renderer/tr_light.c
+++ b/code/renderer/tr_light.c
@@ -160,7 +160,7 @@ static void R_SetupEntityLightingGrid( trRefEntity_t *ent ) {
VectorClear( ent->directedLight );
VectorClear( direction );
- assert( tr.world->lightGridData ); // bk010103 - NULL with -nolight maps
+ assert( tr.world->lightGridData ); // NULL with -nolight maps
// trilerp the light value
gridStep[0] = 8;
@@ -380,7 +380,6 @@ int R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, ve
{
trRefEntity_t ent;
- // bk010103 - this segfaults with -nolight maps
if ( tr.world->lightGridData == NULL )
return qfalse;
diff --git a/code/renderer/tr_shader.c b/code/renderer/tr_shader.c
index 3f12269..275e32d 100644
--- a/code/renderer/tr_shader.c
+++ b/code/renderer/tr_shader.c
@@ -2360,7 +2360,7 @@ shader_t *R_FindShaderByName( const char *name ) {
int hash;
shader_t *sh;
- if ( (name==NULL) || (name[0] == 0) ) { // bk001205
+ if ( (name==NULL) || (name[0] == 0) ) {
return tr.defaultShader;
}
@@ -2770,7 +2770,7 @@ it and returns a valid (possibly default) shader_t to be used internally.
*/
shader_t *R_GetShaderByHandle( qhandle_t hShader ) {
if ( hShader < 0 ) {
- ri.Printf( PRINT_WARNING, "R_GetShaderByHandle: out of range hShader '%d'\n", hShader ); // bk: FIXME name
+ ri.Printf( PRINT_WARNING, "R_GetShaderByHandle: out of range hShader '%d'\n", hShader );
return tr.defaultShader;
}
if ( hShader >= tr.numShaders ) {
diff --git a/code/renderer/tr_types.h b/code/renderer/tr_types.h
index 12b526e..4edbaf5 100644
--- a/code/renderer/tr_types.h
+++ b/code/renderer/tr_types.h
@@ -202,33 +202,4 @@ typedef struct {
qboolean smpActive; // dual processor
} glconfig_t;
-// FIXME: VM should be OS agnostic .. in theory
-
-/*
-#ifdef Q3_VM
-
-#define _3DFX_DRIVER_NAME "Voodoo"
-#define OPENGL_DRIVER_NAME "Default"
-
-#elif defined(_WIN32)
-*/
-
-#if defined(Q3_VM) || defined(_WIN32)
-
-#define _3DFX_DRIVER_NAME "3dfxvgl"
-#define OPENGL_DRIVER_NAME "opengl32"
-
-#elif defined(MACOS_X)
-
-#define _3DFX_DRIVER_NAME "libMesaVoodooGL.dylib"
-#define OPENGL_DRIVER_NAME "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib"
-
-#else
-
-#define _3DFX_DRIVER_NAME "libMesaVoodooGL.so"
-// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=524
-#define OPENGL_DRIVER_NAME "libGL.so.1"
-
-#endif // !defined _WIN32
-
#endif // __TR_TYPES_H