Client refactoring

Some stuff being reordered
This commit is contained in:
Alejandro Ricoveri 2013-05-01 16:54:44 -04:30 committed by Yamagi Burmeister
parent 3e45c5e363
commit 2b0974822c
27 changed files with 3326 additions and 3537 deletions

View file

@ -3270,7 +3270,7 @@ QGL_Shutdown(void)
{
if (glw_state.OpenGLLib)
{
ri.Sys_FreeLibrary(glw_state.OpenGLLib);
Sys_FreeLibrary(glw_state.OpenGLLib);
glw_state.OpenGLLib = NULL;
}
@ -3631,7 +3631,7 @@ GetProcAddressGL(char *symbol)
}
else if (glw_state.OpenGLLib)
{
return ri.Sys_GetProcAddress(glw_state.OpenGLLib, symbol);
return Sys_GetProcAddress(glw_state.OpenGLLib, symbol);
}
else
{
@ -3654,7 +3654,7 @@ QGL_Init(const char *dllname)
QGL_Shutdown();
}
ri.Sys_LoadLibrary(dllname, NULL, &glw_state.OpenGLLib);
Sys_LoadLibrary(dllname, NULL, &glw_state.OpenGLLib);
if (glw_state.OpenGLLib == 0)
{
@ -3662,16 +3662,16 @@ QGL_Init(const char *dllname)
char *path;
/* try basedir next */
path = ri.Cvar_Get("basedir", ".", CVAR_NOSET)->string;
path = Cvar_Get("basedir", ".", CVAR_NOSET)->string;
snprintf(fn, MAX_OSPATH, "%s/%s", path, dllname);
ri.Sys_LoadLibrary(fn, NULL, &glw_state.OpenGLLib);
Sys_LoadLibrary(fn, NULL, &glw_state.OpenGLLib);
if (glw_state.OpenGLLib == NULL)
{
ri.Con_Printf(PRINT_ALL, "Trying hardcoded default libGL\n");
VID_Printf(PRINT_ALL, "Trying hardcoded default libGL\n");
ri.Sys_LoadLibrary(LIBGL, NULL, &glw_state.OpenGLLib);
Sys_LoadLibrary(LIBGL, NULL, &glw_state.OpenGLLib);
if (glw_state.OpenGLLib == NULL)
{
@ -3679,359 +3679,359 @@ QGL_Init(const char *dllname)
}
else
{
ri.Cvar_Set("gl_driver", LIBGL);
ri.Con_Printf(PRINT_ALL, "Using %s for OpenGL.\n", LIBGL);
Cvar_Set("gl_driver", LIBGL);
VID_Printf(PRINT_ALL, "Using %s for OpenGL.\n", LIBGL);
}
}
else
{
ri.Con_Printf(PRINT_ALL, "Using %s for OpenGL.\n", fn);
VID_Printf(PRINT_ALL, "Using %s for OpenGL.\n", fn);
}
}
else
{
ri.Con_Printf(PRINT_ALL, "Using %s for OpenGL.\n", dllname);
VID_Printf(PRINT_ALL, "Using %s for OpenGL.\n", dllname);
}
qglAccum = dllAccum = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glAccum");
qglAlphaFunc = dllAlphaFunc = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glAlphaFunc");
qglAreTexturesResident = dllAreTexturesResident = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glAreTexturesResident");
qglArrayElement = dllArrayElement = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glArrayElement");
qglBegin = dllBegin = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glBegin");
qglBindTexture = dllBindTexture = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glBindTexture");
qglBitmap = dllBitmap = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glBitmap");
qglBlendFunc = dllBlendFunc = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glBlendFunc");
qglCallList = dllCallList = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glCallList");
qglCallLists = dllCallLists = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glCallLists");
qglClear = dllClear = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glClear");
qglClearAccum = dllClearAccum = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glClearAccum");
qglClearColor = dllClearColor = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glClearColor");
qglClearDepth = dllClearDepth = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glClearDepth");
qglClearIndex = dllClearIndex = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glClearIndex");
qglClearStencil = dllClearStencil = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glClearStencil");
qglClipPlane = dllClipPlane = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glClipPlane");
qglColor3b = dllColor3b = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3b");
qglColor3bv = dllColor3bv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3bv");
qglColor3d = dllColor3d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3d");
qglColor3dv = dllColor3dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3dv");
qglColor3f = dllColor3f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3f");
qglColor3fv = dllColor3fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3fv");
qglColor3i = dllColor3i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3i");
qglColor3iv = dllColor3iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3iv");
qglColor3s = dllColor3s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3s");
qglColor3sv = dllColor3sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3sv");
qglColor3ub = dllColor3ub = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3ub");
qglColor3ubv = dllColor3ubv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3ubv");
qglColor3ui = dllColor3ui = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3ui");
qglColor3uiv = dllColor3uiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3uiv");
qglColor3us = dllColor3us = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3us");
qglColor3usv = dllColor3usv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3usv");
qglColor4b = dllColor4b = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4b");
qglColor4bv = dllColor4bv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4bv");
qglColor4d = dllColor4d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4d");
qglColor4dv = dllColor4dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4dv");
qglColor4f = dllColor4f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4f");
qglColor4fv = dllColor4fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4fv");
qglColor4i = dllColor4i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4i");
qglColor4iv = dllColor4iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4iv");
qglColor4s = dllColor4s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4s");
qglColor4sv = dllColor4sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4sv");
qglColor4ub = dllColor4ub = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4ub");
qglColor4ubv = dllColor4ubv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4ubv");
qglColor4ui = dllColor4ui = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4ui");
qglColor4uiv = dllColor4uiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4uiv");
qglColor4us = dllColor4us = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4us");
qglColor4usv = dllColor4usv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4usv");
qglColorMask = dllColorMask = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColorMask");
qglColorMaterial = dllColorMaterial = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColorMaterial");
qglColorPointer = dllColorPointer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glColorPointer");
qglCopyPixels = dllCopyPixels = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyPixels");
qglCopyTexImage1D = dllCopyTexImage1D = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyTexImage1D");
qglCopyTexImage2D = dllCopyTexImage2D = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyTexImage2D");
qglCopyTexSubImage1D = dllCopyTexSubImage1D = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyTexSubImage1D");
qglCopyTexSubImage2D = dllCopyTexSubImage2D = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyTexSubImage2D");
qglCullFace = dllCullFace = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glCullFace");
qglDeleteLists = dllDeleteLists = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDeleteLists");
qglDeleteTextures = dllDeleteTextures = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDeleteTextures");
qglDepthFunc = dllDepthFunc = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDepthFunc");
qglDepthMask = dllDepthMask = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDepthMask");
qglDepthRange = dllDepthRange = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDepthRange");
qglDisable = dllDisable = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDisable");
qglDisableClientState = dllDisableClientState = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDisableClientState");
qglDrawArrays = dllDrawArrays = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDrawArrays");
qglDrawBuffer = dllDrawBuffer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDrawBuffer");
qglDrawElements = dllDrawElements = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDrawElements");
qglDrawPixels = dllDrawPixels = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glDrawPixels");
qglEdgeFlag = dllEdgeFlag = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEdgeFlag");
qglEdgeFlagPointer = dllEdgeFlagPointer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEdgeFlagPointer");
qglEdgeFlagv = dllEdgeFlagv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEdgeFlagv");
qglEnable = dllEnable = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEnable");
qglEnableClientState = dllEnableClientState = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEnableClientState");
qglEnd = dllEnd = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEnd");
qglEndList = dllEndList = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEndList");
qglEvalCoord1d = dllEvalCoord1d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord1d");
qglEvalCoord1dv = dllEvalCoord1dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord1dv");
qglEvalCoord1f = dllEvalCoord1f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord1f");
qglEvalCoord1fv = dllEvalCoord1fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord1fv");
qglEvalCoord2d = dllEvalCoord2d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord2d");
qglEvalCoord2dv = dllEvalCoord2dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord2dv");
qglEvalCoord2f = dllEvalCoord2f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord2f");
qglEvalCoord2fv = dllEvalCoord2fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord2fv");
qglEvalMesh1 = dllEvalMesh1 = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalMesh1");
qglEvalMesh2 = dllEvalMesh2 = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalMesh2");
qglEvalPoint1 = dllEvalPoint1 = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalPoint1");
qglEvalPoint2 = dllEvalPoint2 = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalPoint2");
qglFeedbackBuffer = dllFeedbackBuffer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glFeedbackBuffer");
qglFinish = dllFinish = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glFinish");
qglFlush = dllFlush = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glFlush");
qglFogf = dllFogf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glFogf");
qglFogfv = dllFogfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glFogfv");
qglFogi = dllFogi = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glFogi");
qglFogiv = dllFogiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glFogiv");
qglFrontFace = dllFrontFace = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glFrontFace");
qglFrustum = dllFrustum = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glFrustum");
qglGenLists = dllGenLists = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGenLists");
qglGenTextures = dllGenTextures = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGenTextures");
qglGetBooleanv = dllGetBooleanv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetBooleanv");
qglGetClipPlane = dllGetClipPlane = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetClipPlane");
qglGetDoublev = dllGetDoublev = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetDoublev");
qglGetError = dllGetError = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetError");
qglGetFloatv = dllGetFloatv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetFloatv");
qglGetIntegerv = dllGetIntegerv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetIntegerv");
qglGetLightfv = dllGetLightfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetLightfv");
qglGetLightiv = dllGetLightiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetLightiv");
qglGetMapdv = dllGetMapdv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMapdv");
qglGetMapfv = dllGetMapfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMapfv");
qglGetMapiv = dllGetMapiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMapiv");
qglGetMaterialfv = dllGetMaterialfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMaterialfv");
qglGetMaterialiv = dllGetMaterialiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMaterialiv");
qglGetPixelMapfv = dllGetPixelMapfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPixelMapfv");
qglGetPixelMapuiv = dllGetPixelMapuiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPixelMapuiv");
qglGetPixelMapusv = dllGetPixelMapusv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPixelMapusv");
qglGetPointerv = dllGetPointerv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPointerv");
qglGetPolygonStipple = dllGetPolygonStipple = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPolygonStipple");
qglGetString = dllGetString = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetString");
qglGetTexEnvfv = dllGetTexEnvfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexEnvfv");
qglGetTexEnviv = dllGetTexEnviv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexEnviv");
qglGetTexGendv = dllGetTexGendv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexGendv");
qglGetTexGenfv = dllGetTexGenfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexGenfv");
qglGetTexGeniv = dllGetTexGeniv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexGeniv");
qglGetTexImage = dllGetTexImage = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexImage");
qglGetTexLevelParameterfv = dllGetTexLevelParameterfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetLevelParameterfv");
qglGetTexLevelParameteriv = dllGetTexLevelParameteriv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetLevelParameteriv");
qglGetTexParameterfv = dllGetTexParameterfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexParameterfv");
qglGetTexParameteriv = dllGetTexParameteriv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexParameteriv");
qglHint = dllHint = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glHint");
qglIndexMask = dllIndexMask = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexMask");
qglIndexPointer = dllIndexPointer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexPointer");
qglIndexd = dllIndexd = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexd");
qglIndexdv = dllIndexdv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexdv");
qglIndexf = dllIndexf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexf");
qglIndexfv = dllIndexfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexfv");
qglIndexi = dllIndexi = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexi");
qglIndexiv = dllIndexiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexiv");
qglIndexs = dllIndexs = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexs");
qglIndexsv = dllIndexsv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexsv");
qglIndexub = dllIndexub = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexub");
qglIndexubv = dllIndexubv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexubv");
qglInitNames = dllInitNames = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glInitNames");
qglInterleavedArrays = dllInterleavedArrays = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glInterleavedArrays");
qglIsEnabled = dllIsEnabled = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIsEnabled");
qglIsList = dllIsList = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIsList");
qglIsTexture = dllIsTexture = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glIsTexture");
qglLightModelf = dllLightModelf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLightModelf");
qglLightModelfv = dllLightModelfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLightModelfv");
qglLightModeli = dllLightModeli = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLightModeli");
qglLightModeliv = dllLightModeliv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLightModeliv");
qglLightf = dllLightf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLightf");
qglLightfv = dllLightfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLightfv");
qglLighti = dllLighti = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLighti");
qglLightiv = dllLightiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLightiv");
qglLineStipple = dllLineStipple = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLineStipple");
qglLineWidth = dllLineWidth = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLineWidth");
qglListBase = dllListBase = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glListBase");
qglLoadIdentity = dllLoadIdentity = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLoadIdentity");
qglLoadMatrixd = dllLoadMatrixd = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLoadMatrixd");
qglLoadMatrixf = dllLoadMatrixf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLoadMatrixf");
qglLoadName = dllLoadName = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLoadName");
qglLogicOp = dllLogicOp = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glLogicOp");
qglMap1d = dllMap1d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMap1d");
qglMap1f = dllMap1f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMap1f");
qglMap2d = dllMap2d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMap2d");
qglMap2f = dllMap2f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMap2f");
qglMapGrid1d = dllMapGrid1d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMapGrid1d");
qglMapGrid1f = dllMapGrid1f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMapGrid1f");
qglMapGrid2d = dllMapGrid2d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMapGrid2d");
qglMapGrid2f = dllMapGrid2f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMapGrid2f");
qglMaterialf = dllMaterialf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMaterialf");
qglMaterialfv = dllMaterialfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMaterialfv");
qglMateriali = dllMateriali = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMateriali");
qglMaterialiv = dllMaterialiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMaterialiv");
qglMatrixMode = dllMatrixMode = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMatrixMode");
qglMultMatrixd = dllMultMatrixd = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMultMatrixd");
qglMultMatrixf = dllMultMatrixf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glMultMatrixf");
qglNewList = dllNewList = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNewList");
qglNormal3b = dllNormal3b = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3b");
qglNormal3bv = dllNormal3bv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3bv");
qglNormal3d = dllNormal3d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3d");
qglNormal3dv = dllNormal3dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3dv");
qglNormal3f = dllNormal3f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3f");
qglNormal3fv = dllNormal3fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3fv");
qglNormal3i = dllNormal3i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3i");
qglNormal3iv = dllNormal3iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3iv");
qglNormal3s = dllNormal3s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3s");
qglNormal3sv = dllNormal3sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3sv");
qglNormalPointer = dllNormalPointer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glNormalPointer");
qglOrtho = dllOrtho = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glOrtho");
qglPassThrough = dllPassThrough = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPassThrough");
qglPixelMapfv = dllPixelMapfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelMapfv");
qglPixelMapuiv = dllPixelMapuiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelMapuiv");
qglPixelMapusv = dllPixelMapusv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelMapusv");
qglPixelStoref = dllPixelStoref = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelStoref");
qglPixelStorei = dllPixelStorei = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelStorei");
qglPixelTransferf = dllPixelTransferf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelTransferf");
qglPixelTransferi = dllPixelTransferi = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelTransferi");
qglPixelZoom = dllPixelZoom = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelZoom");
qglPointSize = dllPointSize = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPointSize");
qglPolygonMode = dllPolygonMode = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPolygonMode");
qglPolygonOffset = dllPolygonOffset = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPolygonOffset");
qglPolygonStipple = dllPolygonStipple = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPolygonStipple");
qglPopAttrib = dllPopAttrib = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPopAttrib");
qglPopClientAttrib = dllPopClientAttrib = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPopClientAttrib");
qglPopMatrix = dllPopMatrix = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPopMatrix");
qglPopName = dllPopName = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPopName");
qglPrioritizeTextures = dllPrioritizeTextures = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPrioritizeTextures");
qglPushAttrib = dllPushAttrib = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPushAttrib");
qglPushClientAttrib = dllPushClientAttrib = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPushClientAttrib");
qglPushMatrix = dllPushMatrix = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPushMatrix");
qglPushName = dllPushName = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glPushName");
qglRasterPos2d = dllRasterPos2d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2d");
qglRasterPos2dv = dllRasterPos2dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2dv");
qglRasterPos2f = dllRasterPos2f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2f");
qglRasterPos2fv = dllRasterPos2fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2fv");
qglRasterPos2i = dllRasterPos2i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2i");
qglRasterPos2iv = dllRasterPos2iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2iv");
qglRasterPos2s = dllRasterPos2s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2s");
qglRasterPos2sv = dllRasterPos2sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2sv");
qglRasterPos3d = dllRasterPos3d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3d");
qglRasterPos3dv = dllRasterPos3dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3dv");
qglRasterPos3f = dllRasterPos3f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3f");
qglRasterPos3fv = dllRasterPos3fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3fv");
qglRasterPos3i = dllRasterPos3i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3i");
qglRasterPos3iv = dllRasterPos3iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3iv");
qglRasterPos3s = dllRasterPos3s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3s");
qglRasterPos3sv = dllRasterPos3sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3sv");
qglRasterPos4d = dllRasterPos4d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4d");
qglRasterPos4dv = dllRasterPos4dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4dv");
qglRasterPos4f = dllRasterPos4f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4f");
qglRasterPos4fv = dllRasterPos4fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4fv");
qglRasterPos4i = dllRasterPos4i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4i");
qglRasterPos4iv = dllRasterPos4iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4iv");
qglRasterPos4s = dllRasterPos4s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4s");
qglRasterPos4sv = dllRasterPos4sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4sv");
qglReadBuffer = dllReadBuffer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glReadBuffer");
qglReadPixels = dllReadPixels = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glReadPixels");
qglRectd = dllRectd = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRectd");
qglRectdv = dllRectdv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRectdv");
qglRectf = dllRectf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRectf");
qglRectfv = dllRectfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRectfv");
qglRecti = dllRecti = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRecti");
qglRectiv = dllRectiv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRectiv");
qglRects = dllRects = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRects");
qglRectsv = dllRectsv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRectsv");
qglRenderMode = dllRenderMode = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRenderMode");
qglRotated = dllRotated = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRotated");
qglRotatef = dllRotatef = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glRotatef");
qglScaled = dllScaled = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glScaled");
qglScalef = dllScalef = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glScalef");
qglScissor = dllScissor = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glScissor");
qglSelectBuffer = dllSelectBuffer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glSelectBuffer");
qglShadeModel = dllShadeModel = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glShadeModel");
qglStencilFunc = dllStencilFunc = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glStencilFunc");
qglStencilMask = dllStencilMask = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glStencilMask");
qglStencilOp = dllStencilOp = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glStencilOp");
qglTexCoord1d = dllTexCoord1d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1d");
qglTexCoord1dv = dllTexCoord1dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1dv");
qglTexCoord1f = dllTexCoord1f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1f");
qglTexCoord1fv = dllTexCoord1fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1fv");
qglTexCoord1i = dllTexCoord1i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1i");
qglTexCoord1iv = dllTexCoord1iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1iv");
qglTexCoord1s = dllTexCoord1s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1s");
qglTexCoord1sv = dllTexCoord1sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1sv");
qglTexCoord2d = dllTexCoord2d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2d");
qglTexCoord2dv = dllTexCoord2dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2dv");
qglTexCoord2f = dllTexCoord2f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2f");
qglTexCoord2fv = dllTexCoord2fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2fv");
qglTexCoord2i = dllTexCoord2i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2i");
qglTexCoord2iv = dllTexCoord2iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2iv");
qglTexCoord2s = dllTexCoord2s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2s");
qglTexCoord2sv = dllTexCoord2sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2sv");
qglTexCoord3d = dllTexCoord3d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3d");
qglTexCoord3dv = dllTexCoord3dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3dv");
qglTexCoord3f = dllTexCoord3f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3f");
qglTexCoord3fv = dllTexCoord3fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3fv");
qglTexCoord3i = dllTexCoord3i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3i");
qglTexCoord3iv = dllTexCoord3iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3iv");
qglTexCoord3s = dllTexCoord3s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3s");
qglTexCoord3sv = dllTexCoord3sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3sv");
qglTexCoord4d = dllTexCoord4d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4d");
qglTexCoord4dv = dllTexCoord4dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4dv");
qglTexCoord4f = dllTexCoord4f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4f");
qglTexCoord4fv = dllTexCoord4fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4fv");
qglTexCoord4i = dllTexCoord4i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4i");
qglTexCoord4iv = dllTexCoord4iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4iv");
qglTexCoord4s = dllTexCoord4s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4s");
qglTexCoord4sv = dllTexCoord4sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4sv");
qglTexCoordPointer = dllTexCoordPointer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoordPointer");
qglTexEnvf = dllTexEnvf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexEnvf");
qglTexEnvfv = dllTexEnvfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexEnvfv");
qglTexEnvi = dllTexEnvi = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexEnvi");
qglTexEnviv = dllTexEnviv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexEnviv");
qglTexGend = dllTexGend = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGend");
qglTexGendv = dllTexGendv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGendv");
qglTexGenf = dllTexGenf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGenf");
qglTexGenfv = dllTexGenfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGenfv");
qglTexGeni = dllTexGeni = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGeni");
qglTexGeniv = dllTexGeniv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGeniv");
qglTexImage1D = dllTexImage1D = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexImage1D");
qglTexImage2D = dllTexImage2D = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexImage2D");
qglTexParameterf = dllTexParameterf = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexParameterf");
qglTexParameterfv = dllTexParameterfv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexParameterfv");
qglTexParameteri = dllTexParameteri = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexParameteri");
qglTexParameteriv = dllTexParameteriv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexParameteriv");
qglTexSubImage1D = dllTexSubImage1D = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexSubImage1D");
qglTexSubImage2D = dllTexSubImage2D = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTexSubImage2D");
qglTranslated = dllTranslated = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTranslated");
qglTranslatef = dllTranslatef = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glTranslatef");
qglVertex2d = dllVertex2d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2d");
qglVertex2dv = dllVertex2dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2dv");
qglVertex2f = dllVertex2f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2f");
qglVertex2fv = dllVertex2fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2fv");
qglVertex2i = dllVertex2i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2i");
qglVertex2iv = dllVertex2iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2iv");
qglVertex2s = dllVertex2s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2s");
qglVertex2sv = dllVertex2sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2sv");
qglVertex3d = dllVertex3d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3d");
qglVertex3dv = dllVertex3dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3dv");
qglVertex3f = dllVertex3f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3f");
qglVertex3fv = dllVertex3fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3fv");
qglVertex3i = dllVertex3i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3i");
qglVertex3iv = dllVertex3iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3iv");
qglVertex3s = dllVertex3s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3s");
qglVertex3sv = dllVertex3sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3sv");
qglVertex4d = dllVertex4d = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4d");
qglVertex4dv = dllVertex4dv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4dv");
qglVertex4f = dllVertex4f = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4f");
qglVertex4fv = dllVertex4fv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4fv");
qglVertex4i = dllVertex4i = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4i");
qglVertex4iv = dllVertex4iv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4iv");
qglVertex4s = dllVertex4s = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4s");
qglVertex4sv = dllVertex4sv = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4sv");
qglVertexPointer = dllVertexPointer = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glVertexPointer");
qglViewport = dllViewport = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "glViewport");
qglAccum = dllAccum = Sys_GetProcAddress(glw_state.OpenGLLib, "glAccum");
qglAlphaFunc = dllAlphaFunc = Sys_GetProcAddress(glw_state.OpenGLLib, "glAlphaFunc");
qglAreTexturesResident = dllAreTexturesResident = Sys_GetProcAddress(glw_state.OpenGLLib, "glAreTexturesResident");
qglArrayElement = dllArrayElement = Sys_GetProcAddress(glw_state.OpenGLLib, "glArrayElement");
qglBegin = dllBegin = Sys_GetProcAddress(glw_state.OpenGLLib, "glBegin");
qglBindTexture = dllBindTexture = Sys_GetProcAddress(glw_state.OpenGLLib, "glBindTexture");
qglBitmap = dllBitmap = Sys_GetProcAddress(glw_state.OpenGLLib, "glBitmap");
qglBlendFunc = dllBlendFunc = Sys_GetProcAddress(glw_state.OpenGLLib, "glBlendFunc");
qglCallList = dllCallList = Sys_GetProcAddress(glw_state.OpenGLLib, "glCallList");
qglCallLists = dllCallLists = Sys_GetProcAddress(glw_state.OpenGLLib, "glCallLists");
qglClear = dllClear = Sys_GetProcAddress(glw_state.OpenGLLib, "glClear");
qglClearAccum = dllClearAccum = Sys_GetProcAddress(glw_state.OpenGLLib, "glClearAccum");
qglClearColor = dllClearColor = Sys_GetProcAddress(glw_state.OpenGLLib, "glClearColor");
qglClearDepth = dllClearDepth = Sys_GetProcAddress(glw_state.OpenGLLib, "glClearDepth");
qglClearIndex = dllClearIndex = Sys_GetProcAddress(glw_state.OpenGLLib, "glClearIndex");
qglClearStencil = dllClearStencil = Sys_GetProcAddress(glw_state.OpenGLLib, "glClearStencil");
qglClipPlane = dllClipPlane = Sys_GetProcAddress(glw_state.OpenGLLib, "glClipPlane");
qglColor3b = dllColor3b = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3b");
qglColor3bv = dllColor3bv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3bv");
qglColor3d = dllColor3d = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3d");
qglColor3dv = dllColor3dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3dv");
qglColor3f = dllColor3f = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3f");
qglColor3fv = dllColor3fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3fv");
qglColor3i = dllColor3i = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3i");
qglColor3iv = dllColor3iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3iv");
qglColor3s = dllColor3s = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3s");
qglColor3sv = dllColor3sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3sv");
qglColor3ub = dllColor3ub = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3ub");
qglColor3ubv = dllColor3ubv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3ubv");
qglColor3ui = dllColor3ui = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3ui");
qglColor3uiv = dllColor3uiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3uiv");
qglColor3us = dllColor3us = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3us");
qglColor3usv = dllColor3usv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor3usv");
qglColor4b = dllColor4b = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4b");
qglColor4bv = dllColor4bv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4bv");
qglColor4d = dllColor4d = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4d");
qglColor4dv = dllColor4dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4dv");
qglColor4f = dllColor4f = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4f");
qglColor4fv = dllColor4fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4fv");
qglColor4i = dllColor4i = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4i");
qglColor4iv = dllColor4iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4iv");
qglColor4s = dllColor4s = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4s");
qglColor4sv = dllColor4sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4sv");
qglColor4ub = dllColor4ub = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4ub");
qglColor4ubv = dllColor4ubv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4ubv");
qglColor4ui = dllColor4ui = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4ui");
qglColor4uiv = dllColor4uiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4uiv");
qglColor4us = dllColor4us = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4us");
qglColor4usv = dllColor4usv = Sys_GetProcAddress(glw_state.OpenGLLib, "glColor4usv");
qglColorMask = dllColorMask = Sys_GetProcAddress(glw_state.OpenGLLib, "glColorMask");
qglColorMaterial = dllColorMaterial = Sys_GetProcAddress(glw_state.OpenGLLib, "glColorMaterial");
qglColorPointer = dllColorPointer = Sys_GetProcAddress(glw_state.OpenGLLib, "glColorPointer");
qglCopyPixels = dllCopyPixels = Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyPixels");
qglCopyTexImage1D = dllCopyTexImage1D = Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyTexImage1D");
qglCopyTexImage2D = dllCopyTexImage2D = Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyTexImage2D");
qglCopyTexSubImage1D = dllCopyTexSubImage1D = Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyTexSubImage1D");
qglCopyTexSubImage2D = dllCopyTexSubImage2D = Sys_GetProcAddress(glw_state.OpenGLLib, "glCopyTexSubImage2D");
qglCullFace = dllCullFace = Sys_GetProcAddress(glw_state.OpenGLLib, "glCullFace");
qglDeleteLists = dllDeleteLists = Sys_GetProcAddress(glw_state.OpenGLLib, "glDeleteLists");
qglDeleteTextures = dllDeleteTextures = Sys_GetProcAddress(glw_state.OpenGLLib, "glDeleteTextures");
qglDepthFunc = dllDepthFunc = Sys_GetProcAddress(glw_state.OpenGLLib, "glDepthFunc");
qglDepthMask = dllDepthMask = Sys_GetProcAddress(glw_state.OpenGLLib, "glDepthMask");
qglDepthRange = dllDepthRange = Sys_GetProcAddress(glw_state.OpenGLLib, "glDepthRange");
qglDisable = dllDisable = Sys_GetProcAddress(glw_state.OpenGLLib, "glDisable");
qglDisableClientState = dllDisableClientState = Sys_GetProcAddress(glw_state.OpenGLLib, "glDisableClientState");
qglDrawArrays = dllDrawArrays = Sys_GetProcAddress(glw_state.OpenGLLib, "glDrawArrays");
qglDrawBuffer = dllDrawBuffer = Sys_GetProcAddress(glw_state.OpenGLLib, "glDrawBuffer");
qglDrawElements = dllDrawElements = Sys_GetProcAddress(glw_state.OpenGLLib, "glDrawElements");
qglDrawPixels = dllDrawPixels = Sys_GetProcAddress(glw_state.OpenGLLib, "glDrawPixels");
qglEdgeFlag = dllEdgeFlag = Sys_GetProcAddress(glw_state.OpenGLLib, "glEdgeFlag");
qglEdgeFlagPointer = dllEdgeFlagPointer = Sys_GetProcAddress(glw_state.OpenGLLib, "glEdgeFlagPointer");
qglEdgeFlagv = dllEdgeFlagv = Sys_GetProcAddress(glw_state.OpenGLLib, "glEdgeFlagv");
qglEnable = dllEnable = Sys_GetProcAddress(glw_state.OpenGLLib, "glEnable");
qglEnableClientState = dllEnableClientState = Sys_GetProcAddress(glw_state.OpenGLLib, "glEnableClientState");
qglEnd = dllEnd = Sys_GetProcAddress(glw_state.OpenGLLib, "glEnd");
qglEndList = dllEndList = Sys_GetProcAddress(glw_state.OpenGLLib, "glEndList");
qglEvalCoord1d = dllEvalCoord1d = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord1d");
qglEvalCoord1dv = dllEvalCoord1dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord1dv");
qglEvalCoord1f = dllEvalCoord1f = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord1f");
qglEvalCoord1fv = dllEvalCoord1fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord1fv");
qglEvalCoord2d = dllEvalCoord2d = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord2d");
qglEvalCoord2dv = dllEvalCoord2dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord2dv");
qglEvalCoord2f = dllEvalCoord2f = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord2f");
qglEvalCoord2fv = dllEvalCoord2fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalCoord2fv");
qglEvalMesh1 = dllEvalMesh1 = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalMesh1");
qglEvalMesh2 = dllEvalMesh2 = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalMesh2");
qglEvalPoint1 = dllEvalPoint1 = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalPoint1");
qglEvalPoint2 = dllEvalPoint2 = Sys_GetProcAddress(glw_state.OpenGLLib, "glEvalPoint2");
qglFeedbackBuffer = dllFeedbackBuffer = Sys_GetProcAddress(glw_state.OpenGLLib, "glFeedbackBuffer");
qglFinish = dllFinish = Sys_GetProcAddress(glw_state.OpenGLLib, "glFinish");
qglFlush = dllFlush = Sys_GetProcAddress(glw_state.OpenGLLib, "glFlush");
qglFogf = dllFogf = Sys_GetProcAddress(glw_state.OpenGLLib, "glFogf");
qglFogfv = dllFogfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glFogfv");
qglFogi = dllFogi = Sys_GetProcAddress(glw_state.OpenGLLib, "glFogi");
qglFogiv = dllFogiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glFogiv");
qglFrontFace = dllFrontFace = Sys_GetProcAddress(glw_state.OpenGLLib, "glFrontFace");
qglFrustum = dllFrustum = Sys_GetProcAddress(glw_state.OpenGLLib, "glFrustum");
qglGenLists = dllGenLists = Sys_GetProcAddress(glw_state.OpenGLLib, "glGenLists");
qglGenTextures = dllGenTextures = Sys_GetProcAddress(glw_state.OpenGLLib, "glGenTextures");
qglGetBooleanv = dllGetBooleanv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetBooleanv");
qglGetClipPlane = dllGetClipPlane = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetClipPlane");
qglGetDoublev = dllGetDoublev = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetDoublev");
qglGetError = dllGetError = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetError");
qglGetFloatv = dllGetFloatv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetFloatv");
qglGetIntegerv = dllGetIntegerv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetIntegerv");
qglGetLightfv = dllGetLightfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetLightfv");
qglGetLightiv = dllGetLightiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetLightiv");
qglGetMapdv = dllGetMapdv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMapdv");
qglGetMapfv = dllGetMapfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMapfv");
qglGetMapiv = dllGetMapiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMapiv");
qglGetMaterialfv = dllGetMaterialfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMaterialfv");
qglGetMaterialiv = dllGetMaterialiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetMaterialiv");
qglGetPixelMapfv = dllGetPixelMapfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPixelMapfv");
qglGetPixelMapuiv = dllGetPixelMapuiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPixelMapuiv");
qglGetPixelMapusv = dllGetPixelMapusv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPixelMapusv");
qglGetPointerv = dllGetPointerv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPointerv");
qglGetPolygonStipple = dllGetPolygonStipple = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetPolygonStipple");
qglGetString = dllGetString = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetString");
qglGetTexEnvfv = dllGetTexEnvfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexEnvfv");
qglGetTexEnviv = dllGetTexEnviv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexEnviv");
qglGetTexGendv = dllGetTexGendv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexGendv");
qglGetTexGenfv = dllGetTexGenfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexGenfv");
qglGetTexGeniv = dllGetTexGeniv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexGeniv");
qglGetTexImage = dllGetTexImage = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexImage");
qglGetTexLevelParameterfv = dllGetTexLevelParameterfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetLevelParameterfv");
qglGetTexLevelParameteriv = dllGetTexLevelParameteriv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetLevelParameteriv");
qglGetTexParameterfv = dllGetTexParameterfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexParameterfv");
qglGetTexParameteriv = dllGetTexParameteriv = Sys_GetProcAddress(glw_state.OpenGLLib, "glGetTexParameteriv");
qglHint = dllHint = Sys_GetProcAddress(glw_state.OpenGLLib, "glHint");
qglIndexMask = dllIndexMask = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexMask");
qglIndexPointer = dllIndexPointer = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexPointer");
qglIndexd = dllIndexd = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexd");
qglIndexdv = dllIndexdv = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexdv");
qglIndexf = dllIndexf = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexf");
qglIndexfv = dllIndexfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexfv");
qglIndexi = dllIndexi = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexi");
qglIndexiv = dllIndexiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexiv");
qglIndexs = dllIndexs = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexs");
qglIndexsv = dllIndexsv = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexsv");
qglIndexub = dllIndexub = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexub");
qglIndexubv = dllIndexubv = Sys_GetProcAddress(glw_state.OpenGLLib, "glIndexubv");
qglInitNames = dllInitNames = Sys_GetProcAddress(glw_state.OpenGLLib, "glInitNames");
qglInterleavedArrays = dllInterleavedArrays = Sys_GetProcAddress(glw_state.OpenGLLib, "glInterleavedArrays");
qglIsEnabled = dllIsEnabled = Sys_GetProcAddress(glw_state.OpenGLLib, "glIsEnabled");
qglIsList = dllIsList = Sys_GetProcAddress(glw_state.OpenGLLib, "glIsList");
qglIsTexture = dllIsTexture = Sys_GetProcAddress(glw_state.OpenGLLib, "glIsTexture");
qglLightModelf = dllLightModelf = Sys_GetProcAddress(glw_state.OpenGLLib, "glLightModelf");
qglLightModelfv = dllLightModelfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glLightModelfv");
qglLightModeli = dllLightModeli = Sys_GetProcAddress(glw_state.OpenGLLib, "glLightModeli");
qglLightModeliv = dllLightModeliv = Sys_GetProcAddress(glw_state.OpenGLLib, "glLightModeliv");
qglLightf = dllLightf = Sys_GetProcAddress(glw_state.OpenGLLib, "glLightf");
qglLightfv = dllLightfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glLightfv");
qglLighti = dllLighti = Sys_GetProcAddress(glw_state.OpenGLLib, "glLighti");
qglLightiv = dllLightiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glLightiv");
qglLineStipple = dllLineStipple = Sys_GetProcAddress(glw_state.OpenGLLib, "glLineStipple");
qglLineWidth = dllLineWidth = Sys_GetProcAddress(glw_state.OpenGLLib, "glLineWidth");
qglListBase = dllListBase = Sys_GetProcAddress(glw_state.OpenGLLib, "glListBase");
qglLoadIdentity = dllLoadIdentity = Sys_GetProcAddress(glw_state.OpenGLLib, "glLoadIdentity");
qglLoadMatrixd = dllLoadMatrixd = Sys_GetProcAddress(glw_state.OpenGLLib, "glLoadMatrixd");
qglLoadMatrixf = dllLoadMatrixf = Sys_GetProcAddress(glw_state.OpenGLLib, "glLoadMatrixf");
qglLoadName = dllLoadName = Sys_GetProcAddress(glw_state.OpenGLLib, "glLoadName");
qglLogicOp = dllLogicOp = Sys_GetProcAddress(glw_state.OpenGLLib, "glLogicOp");
qglMap1d = dllMap1d = Sys_GetProcAddress(glw_state.OpenGLLib, "glMap1d");
qglMap1f = dllMap1f = Sys_GetProcAddress(glw_state.OpenGLLib, "glMap1f");
qglMap2d = dllMap2d = Sys_GetProcAddress(glw_state.OpenGLLib, "glMap2d");
qglMap2f = dllMap2f = Sys_GetProcAddress(glw_state.OpenGLLib, "glMap2f");
qglMapGrid1d = dllMapGrid1d = Sys_GetProcAddress(glw_state.OpenGLLib, "glMapGrid1d");
qglMapGrid1f = dllMapGrid1f = Sys_GetProcAddress(glw_state.OpenGLLib, "glMapGrid1f");
qglMapGrid2d = dllMapGrid2d = Sys_GetProcAddress(glw_state.OpenGLLib, "glMapGrid2d");
qglMapGrid2f = dllMapGrid2f = Sys_GetProcAddress(glw_state.OpenGLLib, "glMapGrid2f");
qglMaterialf = dllMaterialf = Sys_GetProcAddress(glw_state.OpenGLLib, "glMaterialf");
qglMaterialfv = dllMaterialfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glMaterialfv");
qglMateriali = dllMateriali = Sys_GetProcAddress(glw_state.OpenGLLib, "glMateriali");
qglMaterialiv = dllMaterialiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glMaterialiv");
qglMatrixMode = dllMatrixMode = Sys_GetProcAddress(glw_state.OpenGLLib, "glMatrixMode");
qglMultMatrixd = dllMultMatrixd = Sys_GetProcAddress(glw_state.OpenGLLib, "glMultMatrixd");
qglMultMatrixf = dllMultMatrixf = Sys_GetProcAddress(glw_state.OpenGLLib, "glMultMatrixf");
qglNewList = dllNewList = Sys_GetProcAddress(glw_state.OpenGLLib, "glNewList");
qglNormal3b = dllNormal3b = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3b");
qglNormal3bv = dllNormal3bv = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3bv");
qglNormal3d = dllNormal3d = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3d");
qglNormal3dv = dllNormal3dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3dv");
qglNormal3f = dllNormal3f = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3f");
qglNormal3fv = dllNormal3fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3fv");
qglNormal3i = dllNormal3i = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3i");
qglNormal3iv = dllNormal3iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3iv");
qglNormal3s = dllNormal3s = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3s");
qglNormal3sv = dllNormal3sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormal3sv");
qglNormalPointer = dllNormalPointer = Sys_GetProcAddress(glw_state.OpenGLLib, "glNormalPointer");
qglOrtho = dllOrtho = Sys_GetProcAddress(glw_state.OpenGLLib, "glOrtho");
qglPassThrough = dllPassThrough = Sys_GetProcAddress(glw_state.OpenGLLib, "glPassThrough");
qglPixelMapfv = dllPixelMapfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelMapfv");
qglPixelMapuiv = dllPixelMapuiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelMapuiv");
qglPixelMapusv = dllPixelMapusv = Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelMapusv");
qglPixelStoref = dllPixelStoref = Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelStoref");
qglPixelStorei = dllPixelStorei = Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelStorei");
qglPixelTransferf = dllPixelTransferf = Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelTransferf");
qglPixelTransferi = dllPixelTransferi = Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelTransferi");
qglPixelZoom = dllPixelZoom = Sys_GetProcAddress(glw_state.OpenGLLib, "glPixelZoom");
qglPointSize = dllPointSize = Sys_GetProcAddress(glw_state.OpenGLLib, "glPointSize");
qglPolygonMode = dllPolygonMode = Sys_GetProcAddress(glw_state.OpenGLLib, "glPolygonMode");
qglPolygonOffset = dllPolygonOffset = Sys_GetProcAddress(glw_state.OpenGLLib, "glPolygonOffset");
qglPolygonStipple = dllPolygonStipple = Sys_GetProcAddress(glw_state.OpenGLLib, "glPolygonStipple");
qglPopAttrib = dllPopAttrib = Sys_GetProcAddress(glw_state.OpenGLLib, "glPopAttrib");
qglPopClientAttrib = dllPopClientAttrib = Sys_GetProcAddress(glw_state.OpenGLLib, "glPopClientAttrib");
qglPopMatrix = dllPopMatrix = Sys_GetProcAddress(glw_state.OpenGLLib, "glPopMatrix");
qglPopName = dllPopName = Sys_GetProcAddress(glw_state.OpenGLLib, "glPopName");
qglPrioritizeTextures = dllPrioritizeTextures = Sys_GetProcAddress(glw_state.OpenGLLib, "glPrioritizeTextures");
qglPushAttrib = dllPushAttrib = Sys_GetProcAddress(glw_state.OpenGLLib, "glPushAttrib");
qglPushClientAttrib = dllPushClientAttrib = Sys_GetProcAddress(glw_state.OpenGLLib, "glPushClientAttrib");
qglPushMatrix = dllPushMatrix = Sys_GetProcAddress(glw_state.OpenGLLib, "glPushMatrix");
qglPushName = dllPushName = Sys_GetProcAddress(glw_state.OpenGLLib, "glPushName");
qglRasterPos2d = dllRasterPos2d = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2d");
qglRasterPos2dv = dllRasterPos2dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2dv");
qglRasterPos2f = dllRasterPos2f = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2f");
qglRasterPos2fv = dllRasterPos2fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2fv");
qglRasterPos2i = dllRasterPos2i = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2i");
qglRasterPos2iv = dllRasterPos2iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2iv");
qglRasterPos2s = dllRasterPos2s = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2s");
qglRasterPos2sv = dllRasterPos2sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos2sv");
qglRasterPos3d = dllRasterPos3d = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3d");
qglRasterPos3dv = dllRasterPos3dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3dv");
qglRasterPos3f = dllRasterPos3f = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3f");
qglRasterPos3fv = dllRasterPos3fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3fv");
qglRasterPos3i = dllRasterPos3i = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3i");
qglRasterPos3iv = dllRasterPos3iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3iv");
qglRasterPos3s = dllRasterPos3s = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3s");
qglRasterPos3sv = dllRasterPos3sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos3sv");
qglRasterPos4d = dllRasterPos4d = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4d");
qglRasterPos4dv = dllRasterPos4dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4dv");
qglRasterPos4f = dllRasterPos4f = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4f");
qglRasterPos4fv = dllRasterPos4fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4fv");
qglRasterPos4i = dllRasterPos4i = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4i");
qglRasterPos4iv = dllRasterPos4iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4iv");
qglRasterPos4s = dllRasterPos4s = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4s");
qglRasterPos4sv = dllRasterPos4sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRasterPos4sv");
qglReadBuffer = dllReadBuffer = Sys_GetProcAddress(glw_state.OpenGLLib, "glReadBuffer");
qglReadPixels = dllReadPixels = Sys_GetProcAddress(glw_state.OpenGLLib, "glReadPixels");
qglRectd = dllRectd = Sys_GetProcAddress(glw_state.OpenGLLib, "glRectd");
qglRectdv = dllRectdv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRectdv");
qglRectf = dllRectf = Sys_GetProcAddress(glw_state.OpenGLLib, "glRectf");
qglRectfv = dllRectfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRectfv");
qglRecti = dllRecti = Sys_GetProcAddress(glw_state.OpenGLLib, "glRecti");
qglRectiv = dllRectiv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRectiv");
qglRects = dllRects = Sys_GetProcAddress(glw_state.OpenGLLib, "glRects");
qglRectsv = dllRectsv = Sys_GetProcAddress(glw_state.OpenGLLib, "glRectsv");
qglRenderMode = dllRenderMode = Sys_GetProcAddress(glw_state.OpenGLLib, "glRenderMode");
qglRotated = dllRotated = Sys_GetProcAddress(glw_state.OpenGLLib, "glRotated");
qglRotatef = dllRotatef = Sys_GetProcAddress(glw_state.OpenGLLib, "glRotatef");
qglScaled = dllScaled = Sys_GetProcAddress(glw_state.OpenGLLib, "glScaled");
qglScalef = dllScalef = Sys_GetProcAddress(glw_state.OpenGLLib, "glScalef");
qglScissor = dllScissor = Sys_GetProcAddress(glw_state.OpenGLLib, "glScissor");
qglSelectBuffer = dllSelectBuffer = Sys_GetProcAddress(glw_state.OpenGLLib, "glSelectBuffer");
qglShadeModel = dllShadeModel = Sys_GetProcAddress(glw_state.OpenGLLib, "glShadeModel");
qglStencilFunc = dllStencilFunc = Sys_GetProcAddress(glw_state.OpenGLLib, "glStencilFunc");
qglStencilMask = dllStencilMask = Sys_GetProcAddress(glw_state.OpenGLLib, "glStencilMask");
qglStencilOp = dllStencilOp = Sys_GetProcAddress(glw_state.OpenGLLib, "glStencilOp");
qglTexCoord1d = dllTexCoord1d = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1d");
qglTexCoord1dv = dllTexCoord1dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1dv");
qglTexCoord1f = dllTexCoord1f = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1f");
qglTexCoord1fv = dllTexCoord1fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1fv");
qglTexCoord1i = dllTexCoord1i = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1i");
qglTexCoord1iv = dllTexCoord1iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1iv");
qglTexCoord1s = dllTexCoord1s = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1s");
qglTexCoord1sv = dllTexCoord1sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord1sv");
qglTexCoord2d = dllTexCoord2d = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2d");
qglTexCoord2dv = dllTexCoord2dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2dv");
qglTexCoord2f = dllTexCoord2f = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2f");
qglTexCoord2fv = dllTexCoord2fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2fv");
qglTexCoord2i = dllTexCoord2i = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2i");
qglTexCoord2iv = dllTexCoord2iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2iv");
qglTexCoord2s = dllTexCoord2s = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2s");
qglTexCoord2sv = dllTexCoord2sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord2sv");
qglTexCoord3d = dllTexCoord3d = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3d");
qglTexCoord3dv = dllTexCoord3dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3dv");
qglTexCoord3f = dllTexCoord3f = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3f");
qglTexCoord3fv = dllTexCoord3fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3fv");
qglTexCoord3i = dllTexCoord3i = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3i");
qglTexCoord3iv = dllTexCoord3iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3iv");
qglTexCoord3s = dllTexCoord3s = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3s");
qglTexCoord3sv = dllTexCoord3sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord3sv");
qglTexCoord4d = dllTexCoord4d = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4d");
qglTexCoord4dv = dllTexCoord4dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4dv");
qglTexCoord4f = dllTexCoord4f = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4f");
qglTexCoord4fv = dllTexCoord4fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4fv");
qglTexCoord4i = dllTexCoord4i = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4i");
qglTexCoord4iv = dllTexCoord4iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4iv");
qglTexCoord4s = dllTexCoord4s = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4s");
qglTexCoord4sv = dllTexCoord4sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoord4sv");
qglTexCoordPointer = dllTexCoordPointer = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexCoordPointer");
qglTexEnvf = dllTexEnvf = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexEnvf");
qglTexEnvfv = dllTexEnvfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexEnvfv");
qglTexEnvi = dllTexEnvi = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexEnvi");
qglTexEnviv = dllTexEnviv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexEnviv");
qglTexGend = dllTexGend = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGend");
qglTexGendv = dllTexGendv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGendv");
qglTexGenf = dllTexGenf = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGenf");
qglTexGenfv = dllTexGenfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGenfv");
qglTexGeni = dllTexGeni = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGeni");
qglTexGeniv = dllTexGeniv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexGeniv");
qglTexImage1D = dllTexImage1D = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexImage1D");
qglTexImage2D = dllTexImage2D = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexImage2D");
qglTexParameterf = dllTexParameterf = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexParameterf");
qglTexParameterfv = dllTexParameterfv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexParameterfv");
qglTexParameteri = dllTexParameteri = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexParameteri");
qglTexParameteriv = dllTexParameteriv = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexParameteriv");
qglTexSubImage1D = dllTexSubImage1D = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexSubImage1D");
qglTexSubImage2D = dllTexSubImage2D = Sys_GetProcAddress(glw_state.OpenGLLib, "glTexSubImage2D");
qglTranslated = dllTranslated = Sys_GetProcAddress(glw_state.OpenGLLib, "glTranslated");
qglTranslatef = dllTranslatef = Sys_GetProcAddress(glw_state.OpenGLLib, "glTranslatef");
qglVertex2d = dllVertex2d = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2d");
qglVertex2dv = dllVertex2dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2dv");
qglVertex2f = dllVertex2f = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2f");
qglVertex2fv = dllVertex2fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2fv");
qglVertex2i = dllVertex2i = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2i");
qglVertex2iv = dllVertex2iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2iv");
qglVertex2s = dllVertex2s = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2s");
qglVertex2sv = dllVertex2sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex2sv");
qglVertex3d = dllVertex3d = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3d");
qglVertex3dv = dllVertex3dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3dv");
qglVertex3f = dllVertex3f = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3f");
qglVertex3fv = dllVertex3fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3fv");
qglVertex3i = dllVertex3i = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3i");
qglVertex3iv = dllVertex3iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3iv");
qglVertex3s = dllVertex3s = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3s");
qglVertex3sv = dllVertex3sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex3sv");
qglVertex4d = dllVertex4d = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4d");
qglVertex4dv = dllVertex4dv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4dv");
qglVertex4f = dllVertex4f = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4f");
qglVertex4fv = dllVertex4fv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4fv");
qglVertex4i = dllVertex4i = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4i");
qglVertex4iv = dllVertex4iv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4iv");
qglVertex4s = dllVertex4s = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4s");
qglVertex4sv = dllVertex4sv = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertex4sv");
qglVertexPointer = dllVertexPointer = Sys_GetProcAddress(glw_state.OpenGLLib, "glVertexPointer");
qglViewport = dllViewport = Sys_GetProcAddress(glw_state.OpenGLLib, "glViewport");
/* Connect wglGetProcAddress (only available on Windows, otherwise NULL */
qwglGetProcAddress = ri.Sys_GetProcAddress(glw_state.OpenGLLib, "wglGetProcAddress");
qwglGetProcAddress = Sys_GetProcAddress(glw_state.OpenGLLib, "wglGetProcAddress");
qglLockArraysEXT = 0;
qglUnlockArraysEXT = 0;
@ -4063,7 +4063,7 @@ GLimp_EnableLogging(qboolean enable)
asctime(newtime);
Com_sprintf(buffer, sizeof(buffer), "%s/gl.log", ri.FS_Gamedir());
Com_sprintf(buffer, sizeof(buffer), "%s/gl.log", FS_Gamedir());
glw_state.log_fp = fopen(buffer, "wt");
fprintf(glw_state.log_fp, "%s\n", asctime(newtime));

View file

@ -76,9 +76,6 @@ vidmode_t vid_modes[] = {
{"Mode 23: 2048x1536", 2048, 1536, 23},
};
/* Structure containing functions exported from refresh DLL */
//refexport_t re;
/* Console variables that we need to access from this module */
cvar_t *vid_gamma;
cvar_t *vid_xpos; /* X coordinate of window position */
@ -163,18 +160,9 @@ VID_NewWindow(int width, int height)
viddef.height = height;
}
// Get rid of refexport function pointers
void
VID_FreeReflib(void)
{
//memset(&re, 0, sizeof(re));
}
qboolean
VID_LoadRefresh(void)
{
refimport_t ri; // Refresh imported functions
// If the refresher is already active
// we'll shut it down
VID_Shutdown();
@ -182,30 +170,8 @@ VID_LoadRefresh(void)
// Log it!
Com_Printf("----- refresher initialization -----\n");
// Fill in client functions for the refresher
ri.Cmd_AddCommand = Cmd_AddCommand;
ri.Cmd_RemoveCommand = Cmd_RemoveCommand;
ri.Cmd_Argc = Cmd_Argc;
ri.Cmd_Argv = Cmd_Argv;
ri.Cmd_ExecuteText = Cbuf_ExecuteText;
ri.Con_Printf = VID_Printf;
ri.Sys_Error = VID_Error;
ri.Sys_Mkdir = Sys_Mkdir;
ri.Sys_LoadLibrary = Sys_LoadLibrary;
ri.Sys_FreeLibrary = Sys_FreeLibrary;
ri.Sys_GetProcAddress = Sys_GetProcAddress;
ri.FS_LoadFile = FS_LoadFile;
ri.FS_FreeFile = FS_FreeFile;
ri.FS_Gamedir = FS_Gamedir;
ri.Cvar_Get = Cvar_Get;
ri.Cvar_Set = Cvar_Set;
ri.Cvar_SetValue = Cvar_SetValue;
ri.Vid_GetModeInfo = VID_GetModeInfo;
ri.Vid_MenuInit = VID_MenuInit;
ri.Vid_NewWindow = VID_NewWindow;
// Get refresher API exports
R_GetRefAPI(ri);
//R_GetRefAPI();
/* Init IN (Mouse) */
in_state.IN_CenterView_fp = IN_CenterView;
@ -225,7 +191,6 @@ VID_LoadRefresh(void)
ref_active = true;
// Initiate the refresher
//if (re.Init(0, 0) == -1)
if (R_Init(0, 0) == -1)
{
VID_Shutdown(); // Isn't that just too bad? :(
@ -288,10 +253,6 @@ VID_Shutdown(void)
/* Shut down the renderer */
R_Shutdown();
// Get rid of refexport function pointers
// (soon to be deleted)
VID_FreeReflib();
}
// Declare the refresher as inactive

View file

@ -360,11 +360,11 @@ IN_GetEvent(SDL_Event *event)
if (surface->flags & SDL_FULLSCREEN)
{
ri.Cvar_SetValue("vid_fullscreen", 1);
Cvar_SetValue("vid_fullscreen", 1);
}
else
{
ri.Cvar_SetValue("vid_fullscreen", 0);
Cvar_SetValue("vid_fullscreen", 0);
}
vid_fullscreen->modified = false;
@ -380,7 +380,7 @@ IN_GetEvent(SDL_Event *event)
KeyStates[SDLK_RSHIFT]) &&
(event->key.keysym.sym == SDLK_ESCAPE))
{
ri.Cmd_ExecuteText(EXEC_NOW, "toggleconsole");
Cbuf_ExecuteText(EXEC_NOW, "toggleconsole");
break;
}
@ -626,32 +626,32 @@ void
IN_BackendInit(in_state_t *in_state_p)
{
in_state = in_state_p;
m_filter = ri.Cvar_Get("m_filter", "0", CVAR_ARCHIVE);
in_mouse = ri.Cvar_Get("in_mouse", "0", CVAR_ARCHIVE);
m_filter = Cvar_Get("m_filter", "0", CVAR_ARCHIVE);
in_mouse = Cvar_Get("in_mouse", "0", CVAR_ARCHIVE);
freelook = ri.Cvar_Get("freelook", "1", 0);
lookstrafe = ri.Cvar_Get("lookstrafe", "0", 0);
sensitivity = ri.Cvar_Get("sensitivity", "3", 0);
exponential_speedup = ri.Cvar_Get("exponential_speedup", "0", CVAR_ARCHIVE);
freelook = Cvar_Get("freelook", "1", 0);
lookstrafe = Cvar_Get("lookstrafe", "0", 0);
sensitivity = Cvar_Get("sensitivity", "3", 0);
exponential_speedup = Cvar_Get("exponential_speedup", "0", CVAR_ARCHIVE);
m_pitch = ri.Cvar_Get("m_pitch", "0.022", 0);
m_yaw = ri.Cvar_Get("m_yaw", "0.022", 0);
m_forward = ri.Cvar_Get("m_forward", "1", 0);
m_side = ri.Cvar_Get("m_side", "0.8", 0);
m_pitch = Cvar_Get("m_pitch", "0.022", 0);
m_yaw = Cvar_Get("m_yaw", "0.022", 0);
m_forward = Cvar_Get("m_forward", "1", 0);
m_side = Cvar_Get("m_side", "0.8", 0);
ri.Cmd_AddCommand("+mlook", IN_MLookDown);
ri.Cmd_AddCommand("-mlook", IN_MLookUp);
ri.Cmd_AddCommand("force_centerview", IN_ForceCenterView);
Cmd_AddCommand("+mlook", IN_MLookDown);
Cmd_AddCommand("-mlook", IN_MLookUp);
Cmd_AddCommand("force_centerview", IN_ForceCenterView);
mouse_x = mouse_y = 0.0;
windowed_mouse = ri.Cvar_Get("windowed_mouse", "1",
windowed_mouse = Cvar_Get("windowed_mouse", "1",
CVAR_USERINFO | CVAR_ARCHIVE);
in_grab = ri.Cvar_Get("in_grab", "2", CVAR_ARCHIVE);
in_grab = Cvar_Get("in_grab", "2", CVAR_ARCHIVE);
vid_fullscreen = ri.Cvar_Get("vid_fullscreen", "0", CVAR_ARCHIVE);
vid_fullscreen = Cvar_Get("vid_fullscreen", "0", CVAR_ARCHIVE);
ri.Con_Printf(PRINT_ALL, "Input initialized.\n");
VID_Printf(PRINT_ALL, "Input initialized.\n");
}
/*
@ -660,10 +660,10 @@ IN_BackendInit(in_state_t *in_state_p)
void
IN_BackendShutdown(void)
{
ri.Cmd_RemoveCommand("+mlook");
ri.Cmd_RemoveCommand("-mlook");
ri.Cmd_RemoveCommand("force_centerview");
ri.Con_Printf(PRINT_ALL, "Input shut down.\n");
Cmd_RemoveCommand("+mlook");
Cmd_RemoveCommand("-mlook");
Cmd_RemoveCommand("force_centerview");
VID_Printf(PRINT_ALL, "Input shut down.\n");
}
/*

View file

@ -76,13 +76,13 @@ GLimp_Init(void)
if (SDL_Init(SDL_INIT_VIDEO) == -1)
{
ri.Con_Printf(PRINT_ALL, "Couldn't init SDL video: %s.\n",
VID_Printf(PRINT_ALL, "Couldn't init SDL video: %s.\n",
SDL_GetError());
return false;
}
SDL_VideoDriverName(driverName, sizeof(driverName) - 1);
ri.Con_Printf(PRINT_ALL, "SDL video driver is \"%s\".\n", driverName);
VID_Printf(PRINT_ALL, "SDL video driver is \"%s\".\n", driverName);
}
return true;
@ -209,7 +209,7 @@ GLimp_InitGraphics(qboolean fullscreen)
}
/* Create the window */
ri.Vid_NewWindow(vid.width, vid.height);
VID_NewWindow(vid.width, vid.height);
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
@ -241,17 +241,17 @@ GLimp_InitGraphics(qboolean fullscreen)
{
if (counter == 1)
{
ri.Sys_Error(ERR_FATAL, "Failed to revert to gl_mode 4. Exiting...\n");
VID_Error(ERR_FATAL, "Failed to revert to gl_mode 4. Exiting...\n");
return false;
}
ri.Con_Printf(PRINT_ALL, "SDL SetVideoMode failed: %s\n",
VID_Printf(PRINT_ALL, "SDL SetVideoMode failed: %s\n",
SDL_GetError());
ri.Con_Printf(PRINT_ALL, "Reverting to gl_mode 4 (640x480) and windowed mode.\n");
VID_Printf(PRINT_ALL, "Reverting to gl_mode 4 (640x480) and windowed mode.\n");
/* Try to recover */
ri.Cvar_SetValue("gl_mode", 4);
ri.Cvar_SetValue("vid_fullscreen", 0);
Cvar_SetValue("gl_mode", 4);
Cvar_SetValue("vid_fullscreen", 0);
vid.width = 640;
vid.height = 480;
@ -267,7 +267,7 @@ GLimp_InitGraphics(qboolean fullscreen)
/* Initialize the stencil buffer */
if (!SDL_GL_GetAttribute(SDL_GL_STENCIL_SIZE, &stencil_bits))
{
ri.Con_Printf(PRINT_ALL, "Got %d bits of stencil.\n", stencil_bits);
VID_Printf(PRINT_ALL, "Got %d bits of stencil.\n", stencil_bits);
if (stencil_bits >= 1)
{
@ -279,7 +279,7 @@ GLimp_InitGraphics(qboolean fullscreen)
#ifdef X11GAMMA
if ((dpy = XOpenDisplay(displayname)) == NULL)
{
ri.Con_Printf(PRINT_ALL, "Unable to open display.\n");
VID_Printf(PRINT_ALL, "Unable to open display.\n");
}
else
{
@ -293,12 +293,12 @@ GLimp_InitGraphics(qboolean fullscreen)
XF86VidModeGetGamma(dpy, screen, &x11_oldgamma);
ri.Con_Printf(PRINT_ALL, "Using hardware gamma via X11.\n");
VID_Printf(PRINT_ALL, "Using hardware gamma via X11.\n");
}
#else
gl_state.hwgamma = true;
vid_gamma->modified = true;
ri.Con_Printf(PRINT_ALL, "Using hardware gamma via SDL.\n");
VID_Printf(PRINT_ALL, "Using hardware gamma via SDL.\n");
#endif
/* Window title */
@ -326,17 +326,17 @@ GLimp_EndFrame(void)
int
GLimp_SetMode(int *pwidth, int *pheight, int mode, qboolean fullscreen)
{
ri.Con_Printf(PRINT_ALL, "setting mode %d:", mode);
VID_Printf(PRINT_ALL, "setting mode %d:", mode);
/* mode -1 is not in the vid mode table - so we keep the values in pwidth
and pheight and don't even try to look up the mode info */
if ((mode != -1) && !ri.Vid_GetModeInfo(pwidth, pheight, mode))
if ((mode != -1) && !VID_GetModeInfo(pwidth, pheight, mode))
{
ri.Con_Printf(PRINT_ALL, " invalid mode\n");
VID_Printf(PRINT_ALL, " invalid mode\n");
return rserr_invalid_mode;
}
ri.Con_Printf(PRINT_ALL, " %d %d\n", *pwidth, *pheight);
VID_Printf(PRINT_ALL, " %d %d\n", *pwidth, *pheight);
if (!GLimp_InitGraphics(fullscreen))
{

View file

@ -250,7 +250,6 @@ CL_PrepRefresh(void)
/* register models, pics, and skins */
Com_Printf("Map: %s\r", mapname);
SCR_UpdateScreen();
//re.BeginRegistration(mapname);
R_BeginRegistration (mapname);
Com_Printf(" \r");

View file

@ -423,8 +423,6 @@ void IN_Accumulate (void);
void CL_ParseLayout (void);
//extern refexport_t re;
void CL_Init (void);
void CL_FixUpGender(void);

View file

@ -28,6 +28,7 @@
#define CL_REF_H
#include "../../common/header/common.h"
#include "vid.h"
#define MAX_DLIGHTS 32
#define MAX_ENTITIES 128
@ -116,115 +117,14 @@ typedef struct {
particle_t *particles;
} refdef_t;
/*
* these are the functions exported by the refresh module
*/
//typedef struct {
// /* if api_version is different, the dll cannot be used */
// int api_version;
//
// /* called when the library is loaded */
// int (*Init)(void *hinstance, void *wndproc);
//
// /* called before the library is unloaded */
// void (*Shutdown)(void);
//
// /* All data that will be used in a level should be
// registered before rendering any frames to prevent disk hits,
// but they can still be registered at a later time
// if necessary.
//
// EndRegistration will free any remaining data that wasn't registered.
// Any model_s or skin_s pointers from before the BeginRegistration
// are no longer valid after EndRegistration.
//
// Skins and images need to be differentiated, because skins
// are flood filled to eliminate mip map edge errors, and pics have
// an implicit "pics/" prepended to the name. (a pic name that starts with a
// slash will not use the "pics/" prefix or the ".pcx" postfix) */
// void (*BeginRegistration)(char *map);
// struct model_s *(*RegisterModel)(char *name);
// struct image_s *(*RegisterSkin)(char *name);
// struct image_s *(*RegisterPic)(char *name);
// void (*SetSky)(char *name, float rotate, vec3_t axis);
// void (*EndRegistration)(void);
//
// void (*RenderFrame)(refdef_t *fd);
// void (*DrawStretchPic)(int x, int y, int w, int h, char *name);
// void (*DrawChar)(int x, int y, int c);
// void (*DrawGetPicSize)(int *w, int *h, char *name); /* will return 0 0 if not found */
// void (*DrawPic)(int x, int y, char *name);
// void (*DrawTileClear)(int x, int y, int w, int h, char *name);
// void (*DrawFill)(int x, int y, int w, int h, int c);
// void (*DrawFadeScreen)(void);
//
// /* Draw images for cinematic rendering (which can have a different palette). Note that calls */
// void (*DrawStretchRaw)(int x, int y, int w, int h, int cols, int rows, byte *data);
//
// /* video mode and refresh state management entry points */
// void (*CinematicSetPalette)(const unsigned char *palette); /* NULL = game palette */
// void (*BeginFrame)(float camera_separation);
// void (*EndFrame)(void);
//
// void (*AppActivate)(qboolean activate);
//
//} refexport_t;
/*
* these are the functions imported by the refresh module
*/
typedef struct {
void (*Sys_Error)(int err_level, char *str, ...);
void (*Sys_Mkdir)(char *path);
void (*Sys_FreeLibrary)(void *handle);
void *(*Sys_LoadLibrary)(const char *path, const char *sym, void **handle);
void *(*Sys_GetProcAddress)(void *handle, const char *sym);
void (*Cmd_AddCommand)(char *name, void(*cmd)(void));
void (*Cmd_RemoveCommand)(char *name);
int (*Cmd_Argc)(void);
char *(*Cmd_Argv)(int i);
void (*Cmd_ExecuteText)(int exec_when, char *text);
void (*Con_Printf)(int print_level, char *str, ...);
/* files will be memory mapped read only
the returned buffer may be part of a larger pak file,
or a discrete file from anywhere in the quake search path
a -1 return means the file does not exist
NULL can be passed for buf to just determine existance */
int (*FS_LoadFile)(char *name, void **buf);
void (*FS_FreeFile)(void *buf);
/* The gamedir is the ./baseq2 directory (read only) and the
~/.quake2/baseq2 directory for write operations. The later
overrides the first */
char *(*FS_Gamedir)(void);
cvar_t *(*Cvar_Get)(char *name, char *value, int flags);
cvar_t *(*Cvar_Set)(char *name, char *value);
void (*Cvar_SetValue)(char *name, float value);
qboolean(*Vid_GetModeInfo)(int *width, int *height, int mode);
void (*Vid_MenuInit)(void);
void (*Vid_NewWindow)(int width, int height);
} refimport_t;
/* this is the only function actually exported at the linker level */
//typedef refexport_t (*R_GetRefAPI_t)(refimport_t);
/* This will be deleted */
//refexport_t R_GetRefAPI(refimport_t rimp);
void *R_GetRefAPI(refimport_t rimp);
/*
* Specifies the model that will be used as the world
*/
void R_BeginRegistration(char *map);
// Soon to be deleted
//void R_GetRefAPI(void);
/*
* Refresh API
*/
void R_BeginRegistration(char *map);
void R_Clear(void);
struct model_s *R_RegisterModel(char *name);
struct image_s *R_RegisterSkin(char *name);
void R_SetSky(char *name, float rotate, vec3_t axis);

View file

@ -46,4 +46,10 @@ void VID_MenuInit(void);
void VID_MenuDraw(void);
const char *VID_MenuKey(int);
void VID_Printf(int print_level, char *fmt, ...);
void VID_Error(int err_level, char *fmt, ...);
void VID_NewWindow(int width, int height);
qboolean VID_GetModeInfo(int *width, int *height, int mode);
#endif

View file

@ -516,7 +516,8 @@ M_Main_Draw(void)
int widest = -1;
int totalheight = 0;
char litname[80];
char *names[] = {
char *names[] =
{
"m_main_game",
"m_main_multiplayer",
"m_main_options",
@ -718,7 +719,8 @@ M_Menu_Multiplayer_f(void)
* KEYS MENU
*/
char *bindnames[][2] = {
char *bindnames[][2] =
{
{"+attack", "attack"},
{"weapnext", "next weapon"},
{"weapprev", "previous weapon"},
@ -1117,7 +1119,7 @@ CDShuffleFunc(void *unused)
{
Cvar_SetValue("cd_shuffle", s_options_cdshuffle_box.curvalue);
#ifdef OGG
#ifdef OGG
cvar_t *ogg;
ogg = Cvar_Get("ogg_enable", "1", CVAR_ARCHIVE);
@ -1150,7 +1152,7 @@ CDShuffleFunc(void *unused)
}
}
#endif
#endif
}
#endif
@ -1160,15 +1162,15 @@ static void
UpdateCDVolumeFunc(void *unused)
{
Cvar_SetValue("cd_nocd", (float)!s_options_cdvolume_box.curvalue);
#ifdef OGG
#ifdef OGG
Cvar_SetValue("ogg_enable", 0);
#endif
#endif
if (s_options_cdvolume_box.curvalue)
{
#ifdef OGG
#ifdef OGG
OGG_Shutdown();
#endif
#endif
CDAudio_Init();
if (s_options_cdshuffle_box.curvalue)
@ -1194,15 +1196,15 @@ static void
UpdateOGGVolumeFunc(void *unused)
{
Cvar_SetValue("ogg_enable", (float)s_options_oggvolume_box.curvalue);
#ifdef CDA
#ifdef CDA
Cvar_SetValue("cd_nocd", 1);
#endif
#endif
if (s_options_oggvolume_box.curvalue)
{
#ifdef CDA
#ifdef CDA
CDAudio_Stop();
#endif
#endif
OGG_Init();
OGG_Stop();
@ -1280,7 +1282,8 @@ static void
Options_MenuInit(void)
{
#ifdef CDA
static const char *cd_music_items[] = {
static const char *cd_music_items[] =
{
"disabled",
"enabled",
0
@ -1288,7 +1291,8 @@ Options_MenuInit(void)
#endif
#ifdef OGG
static const char *ogg_music_items[] = {
static const char *ogg_music_items[] =
{
"disabled",
"enabled",
0
@ -1296,24 +1300,28 @@ Options_MenuInit(void)
#endif
#if defined(OGG) || defined(CDA)
static const char *cd_shuffle[] = {
static const char *cd_shuffle[] =
{
"disabled",
"enabled",
0
};
#endif
static const char *quality_items[] = {
static const char *quality_items[] =
{
"normal", "high", 0
};
static const char *yesno_names[] = {
static const char *yesno_names[] =
{
"no",
"yes",
0
};
static const char *crosshair_names[] = {
static const char *crosshair_names[] =
{
"none",
"cross",
"dot",
@ -1607,7 +1615,8 @@ static const char *idcredits[] = {
0
};
static const char *xatcredits[] = {
static const char *xatcredits[] =
{
"+QUAKE II MISSION PACK: THE RECKONING",
"+BY",
"+XATRIX ENTERTAINMENT, INC.",
@ -1747,7 +1756,8 @@ static const char *xatcredits[] = {
0
};
static const char *roguecredits[] = {
static const char *roguecredits[] =
{
"+QUAKE II MISSION PACK 2: GROUND ZERO",
"+BY",
"+ROGUE ENTERTAINMENT, INC.",
@ -2820,12 +2830,14 @@ StartServerActionFunc(void *self)
static void
StartServer_MenuInit(void)
{
static const char *dm_coop_names[] = {
static const char *dm_coop_names[] =
{
"deathmatch",
"cooperative",
0
};
static const char *dm_coop_names_rogue[] = {
static const char *dm_coop_names_rogue[] =
{
"deathmatch",
"cooperative",
"tag",
@ -3265,10 +3277,12 @@ setvalue:
static void
DMOptions_MenuInit(void)
{
static const char *yes_no_names[] = {
static const char *yes_no_names[] =
{
"no", "yes", 0
};
static const char *teamplay_names[] = {
static const char *teamplay_names[] =
{
"disabled", "by skin", "by model", 0
};
int dmflags = Cvar_VariableValue("dmflags");
@ -3528,7 +3542,8 @@ DownloadCallback(void *self)
static void
DownloadOptions_MenuInit(void)
{
static const char *yes_no_names[] = {
static const char *yes_no_names[] =
{
"no", "yes", 0
};
int y = 0;
@ -3729,7 +3744,8 @@ static int s_numplayermodels;
static int rate_tbl[] = {2500, 3200, 5000, 10000, 25000, 0};
static const char *rate_names[] = {"28.8 Modem", "33.6 Modem", "Single ISDN",
"Dual ISDN/Cable", "T1/LAN", "User defined",
0};
0
};
static void
DownloadOptionsFunc(void *self)

View file

@ -42,13 +42,10 @@ static void SpinControl_DoSlide(menulist_s *s, int dir);
#define RCOLUMN_OFFSET 16
#define LCOLUMN_OFFSET -16
//extern refexport_t re;
extern viddef_t viddef;
#define VID_WIDTH viddef.width
#define VID_HEIGHT viddef.height
//#define Draw_Char re.DrawChar
//#define Draw_Fill re.DrawFill
void
Action_DoEnter(menuaction_s *a)

View file

@ -48,7 +48,7 @@ jpg_null(j_decompress_ptr cinfo)
boolean
jpg_fill_input_buffer(j_decompress_ptr cinfo)
{
ri.Con_Printf(PRINT_ALL, "Premature end of JPEG data\n");
VID_Printf(PRINT_ALL, "Premature end of JPEG data\n");
return 1;
}
@ -95,7 +95,7 @@ LoadJPG(char *origname, byte **pic, int *width, int *height)
*pic = NULL;
/* Load JPEG file into memory */
rawsize = ri.FS_LoadFile(filename, (void **)&rawdata);
rawsize = FS_LoadFile(filename, (void **)&rawdata);
if (!rawdata)
{
@ -105,8 +105,8 @@ LoadJPG(char *origname, byte **pic, int *width, int *height)
if ((rawsize < 10) || (rawdata[6] != 'J') || (rawdata[7] != 'F') ||
(rawdata[8] != 'I') || (rawdata[9] != 'F'))
{
ri.Con_Printf(PRINT_ALL, "Invalid JPEG header: %s\n", filename);
ri.FS_FreeFile(rawdata);
VID_Printf(PRINT_ALL, "Invalid JPEG header: %s\n", filename);
FS_FreeFile(rawdata);
return;
}
@ -118,9 +118,9 @@ LoadJPG(char *origname, byte **pic, int *width, int *height)
if ((cinfo.output_components != 3) && (cinfo.output_components != 4))
{
ri.Con_Printf(PRINT_ALL, "Invalid JPEG colour components\n");
VID_Printf(PRINT_ALL, "Invalid JPEG colour components\n");
jpeg_destroy_decompress(&cinfo);
ri.FS_FreeFile(rawdata);
FS_FreeFile(rawdata);
return;
}
@ -129,9 +129,9 @@ LoadJPG(char *origname, byte **pic, int *width, int *height)
if (!rgbadata)
{
ri.Con_Printf(PRINT_ALL, "Insufficient memory for JPEG buffer\n");
VID_Printf(PRINT_ALL, "Insufficient memory for JPEG buffer\n");
jpeg_destroy_decompress(&cinfo);
ri.FS_FreeFile(rawdata);
FS_FreeFile(rawdata);
return;
}
@ -144,11 +144,11 @@ LoadJPG(char *origname, byte **pic, int *width, int *height)
if (!scanline)
{
ri.Con_Printf(PRINT_ALL,
VID_Printf(PRINT_ALL,
"Insufficient memory for JPEG scanline buffer\n");
free(rgbadata);
jpeg_destroy_decompress(&cinfo);
ri.FS_FreeFile(rawdata);
FS_FreeFile(rawdata);
return;
}

View file

@ -43,7 +43,7 @@ LoadMD2(model_t *mod, void *buffer)
if (version != ALIAS_VERSION)
{
ri.Sys_Error(ERR_DROP, "%s has wrong version number (%i should be %i)",
VID_Error(ERR_DROP, "%s has wrong version number (%i should be %i)",
mod->name, version, ALIAS_VERSION);
}
@ -57,33 +57,33 @@ LoadMD2(model_t *mod, void *buffer)
if (pheader->skinheight > MAX_LBM_HEIGHT)
{
ri.Sys_Error(ERR_DROP, "model %s has a skin taller than %d", mod->name,
VID_Error(ERR_DROP, "model %s has a skin taller than %d", mod->name,
MAX_LBM_HEIGHT);
}
if (pheader->num_xyz <= 0)
{
ri.Sys_Error(ERR_DROP, "model %s has no vertices", mod->name);
VID_Error(ERR_DROP, "model %s has no vertices", mod->name);
}
if (pheader->num_xyz > MAX_VERTS)
{
ri.Sys_Error(ERR_DROP, "model %s has too many vertices", mod->name);
VID_Error(ERR_DROP, "model %s has too many vertices", mod->name);
}
if (pheader->num_st <= 0)
{
ri.Sys_Error(ERR_DROP, "model %s has no st vertices", mod->name);
VID_Error(ERR_DROP, "model %s has no st vertices", mod->name);
}
if (pheader->num_tris <= 0)
{
ri.Sys_Error(ERR_DROP, "model %s has no triangles", mod->name);
VID_Error(ERR_DROP, "model %s has no triangles", mod->name);
}
if (pheader->num_frames <= 0)
{
ri.Sys_Error(ERR_DROP, "model %s has no frames", mod->name);
VID_Error(ERR_DROP, "model %s has no frames", mod->name);
}
/* load base s and t vertices (not used in gl version) */

View file

@ -49,11 +49,11 @@ LoadPCX(char *origname, byte **pic, byte **palette, int *width, int *height)
*palette = NULL;
/* load the file */
len = ri.FS_LoadFile(filename, (void **)&raw);
len = FS_LoadFile(filename, (void **)&raw);
if (!raw)
{
ri.Con_Printf(PRINT_DEVELOPER, "Bad pcx file %s\n", filename);
VID_Printf(PRINT_DEVELOPER, "Bad pcx file %s\n", filename);
return;
}
@ -75,7 +75,7 @@ LoadPCX(char *origname, byte **pic, byte **palette, int *width, int *height)
(pcx->encoding != 1) || (pcx->bits_per_pixel != 8) ||
(pcx->xmax >= 640) || (pcx->ymax >= 480))
{
ri.Con_Printf(PRINT_ALL, "Bad pcx file %s\n", filename);
VID_Printf(PRINT_ALL, "Bad pcx file %s\n", filename);
return;
}
@ -126,12 +126,12 @@ LoadPCX(char *origname, byte **pic, byte **palette, int *width, int *height)
if (raw - (byte *)pcx > len)
{
ri.Con_Printf(PRINT_DEVELOPER, "PCX file %s was malformed", filename);
VID_Printf(PRINT_DEVELOPER, "PCX file %s was malformed", filename);
free(*pic);
*pic = NULL;
}
ri.FS_FreeFile(pcx);
FS_FreeFile(pcx);
}
void
@ -140,7 +140,7 @@ GetPCXInfo(char *filename, int *width, int *height)
pcx_t *pcx;
byte *raw;
ri.FS_LoadFile(filename, (void **)&raw);
FS_LoadFile(filename, (void **)&raw);
if (!raw)
{
@ -152,7 +152,7 @@ GetPCXInfo(char *filename, int *width, int *height)
*width = pcx->xmax + 1;
*height = pcx->ymax + 1;
ri.FS_FreeFile(raw);
FS_FreeFile(raw);
return;
}

View file

@ -43,13 +43,13 @@ LoadSP2(model_t *mod, void *buffer)
if (sprout->version != SPRITE_VERSION)
{
ri.Sys_Error(ERR_DROP, "%s has wrong version number (%i should be %i)",
VID_Error(ERR_DROP, "%s has wrong version number (%i should be %i)",
mod->name, sprout->version, SPRITE_VERSION);
}
if (sprout->numframes > MAX_MD2SKINS)
{
ri.Sys_Error(ERR_DROP, "%s has too many frames (%i > %i)",
VID_Error(ERR_DROP, "%s has too many frames (%i > %i)",
mod->name, sprout->numframes, MAX_MD2SKINS);
}

View file

@ -60,7 +60,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
*pic = NULL;
/* load the file */
length = ri.FS_LoadFile(name, (void **)&buffer);
length = FS_LoadFile(name, (void **)&buffer);
if (!buffer)
{
@ -69,7 +69,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (length < 18)
{
ri.Sys_Error(ERR_DROP, "LoadTGA: %s has an invalid file size", name);
VID_Error(ERR_DROP, "LoadTGA: %s has an invalid file size", name);
}
buf_p = buffer;
@ -101,17 +101,17 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
(targa_header.image_type != 10) &&
(targa_header.image_type != 3))
{
ri.Sys_Error(ERR_DROP, "LoadTGA (%s): Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported", name);
VID_Error(ERR_DROP, "LoadTGA (%s): Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported", name);
}
if (targa_header.colormap_type != 0)
{
ri.Sys_Error(ERR_DROP, "LoadTGA (%s): colormaps not supported", name);
VID_Error(ERR_DROP, "LoadTGA (%s): colormaps not supported", name);
}
if (((targa_header.pixel_size != 32) && (targa_header.pixel_size != 24)) && (targa_header.image_type != 3))
{
ri.Sys_Error( ERR_DROP, "LoadTGA (%s): Only 32 or 24 bit images supported (no colormaps)", name);
VID_Error( ERR_DROP, "LoadTGA (%s): Only 32 or 24 bit images supported (no colormaps)", name);
}
columns = targa_header.width;
@ -130,7 +130,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (!columns || !rows || (numPixels > 0x7FFFFFFF) || (numPixels / columns / 4 != rows))
{
ri.Sys_Error(ERR_DROP, "LoadTGA (%s): Invalid image size", name);
VID_Error(ERR_DROP, "LoadTGA (%s): Invalid image size", name);
}
targa_rgba = malloc(numPixels);
@ -152,7 +152,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (buf_p - buffer + (3 * columns * rows) > length)
{
ri.Sys_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
VID_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
}
for (row = rows - 1; row >= 0; row--)
@ -179,7 +179,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (buf_p - buffer + (4 * columns * rows) > length)
{
ri.Sys_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
VID_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
}
for (row = rows - 1; row >= 0; row--)
@ -207,7 +207,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (buf_p - buffer + (1 * columns * rows) > length)
{
ri.Sys_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
VID_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
}
for (row = rows - 1; row >= 0; row--)
@ -260,7 +260,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (buf_p - buffer + (3) > length)
{
ri.Sys_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
VID_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
}
blue = *buf_p++;
@ -272,7 +272,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (buf_p - buffer + (4) > length)
{
ri.Sys_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
VID_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
}
blue = *buf_p++;
@ -319,7 +319,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (buf_p - buffer + (3 * packetSize) > length)
{
ri.Sys_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
VID_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
}
for (j = 0; j < packetSize; j++)
@ -358,7 +358,7 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (buf_p - buffer + (4 * packetSize) > length)
{
ri.Sys_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
VID_Error( ERR_DROP, "LoadTGA: (%s): Pointer passed end of file - corrupt TGA file", name);
}
for (j = 0; j < packetSize; j++)
@ -411,10 +411,10 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
if (!temp)
{
ri.Sys_Error(ERR_FATAL, "LoadTGA: not enough memory");
VID_Error(ERR_FATAL, "LoadTGA: not enough memory");
}
ri.Con_Printf(PRINT_DEVELOPER, "LoadTGA: Bottom-to-top TGA file (slow): %s\n", name);
VID_Printf(PRINT_DEVELOPER, "LoadTGA: Bottom-to-top TGA file (slow): %s\n", name);
memcpy(temp, targa_rgba, numPixels);
for (row = 0; row < rows; row++)
@ -425,5 +425,5 @@ LoadTGA(char *origname, byte **pic, int *width, int *height)
free(temp);
}
ri.FS_FreeFile(buffer);
FS_FreeFile(buffer);
}

View file

@ -42,11 +42,11 @@ LoadWal(char *origname)
Q_strlcat(name, ".wal", sizeof(name));
}
ri.FS_LoadFile(name, (void **)&mt);
FS_LoadFile(name, (void **)&mt);
if (!mt)
{
ri.Con_Printf(PRINT_ALL, "LoadWall: can't load %s\n", name);
VID_Printf(PRINT_ALL, "LoadWall: can't load %s\n", name);
return r_notexture;
}
@ -56,7 +56,7 @@ LoadWal(char *origname)
image = R_LoadPic(name, (byte *)mt + ofs, width, 0, height, 0, it_wall, 8);
ri.FS_FreeFile((void *)mt);
FS_FreeFile((void *)mt);
return image;
}
@ -66,7 +66,7 @@ GetWalInfo(char *name, int *width, int *height)
{
miptex_t *mt;
ri.FS_LoadFile(name, (void **)&mt);
FS_LoadFile(name, (void **)&mt);
if (!mt)
{
@ -76,7 +76,7 @@ GetWalInfo(char *name, int *width, int *height)
*width = LittleLong(mt->width);
*height = LittleLong(mt->height);
ri.FS_FreeFile((void *)mt);
FS_FreeFile((void *)mt);
return;
}

View file

@ -83,16 +83,7 @@
/* fall over */
#define ROLL 2
#ifndef __VIDDEF_T
#define __VIDDEF_T
typedef struct
{
int width, height; /* coordinates from main game */
} viddef_t;
#endif
char *strlwr(char *s);
extern viddef_t vid;
/*
@ -319,8 +310,6 @@ int Draw_GetPalette(void);
void R_ResampleTexture(unsigned *in, int inwidth, int inheight,
unsigned *out, int outwidth, int outheight);
struct image_s *R_RegisterSkin(char *name);
void LoadPCX(char *filename, byte **pic, byte **palette,
int *width, int *height);
image_t *LoadWal(char *name);
@ -409,7 +398,6 @@ typedef struct
extern glconfig_t gl_config;
extern glstate_t gl_state;
extern refimport_t ri;
void GLimp_BeginFrame(float camera_separation);
int GLimp_Init(void);

View file

@ -132,7 +132,7 @@ Draw_StretchPic(int x, int y, int w, int h, char *pic)
if (!gl)
{
ri.Con_Printf(PRINT_ALL, "Can't find pic: %s\n", pic);
VID_Printf(PRINT_ALL, "Can't find pic: %s\n", pic);
return;
}
@ -163,7 +163,7 @@ Draw_Pic(int x, int y, char *pic)
if (!gl)
{
ri.Con_Printf(PRINT_ALL, "Can't find pic: %s\n", pic);
VID_Printf(PRINT_ALL, "Can't find pic: %s\n", pic);
return;
}
@ -199,7 +199,7 @@ Draw_TileClear(int x, int y, int w, int h, char *pic)
if (!image)
{
ri.Con_Printf(PRINT_ALL, "Can't find pic: %s\n", pic);
VID_Printf(PRINT_ALL, "Can't find pic: %s\n", pic);
return;
}
@ -230,7 +230,7 @@ Draw_Fill(int x, int y, int w, int h, int c)
if ((unsigned)c > 255)
{
ri.Sys_Error(ERR_FATAL, "Draw_Fill: bad color");
VID_Error(ERR_FATAL, "Draw_Fill: bad color");
}
qglDisable(GL_TEXTURE_2D);
@ -390,7 +390,7 @@ Draw_GetPalette(void)
if (!pal)
{
ri.Sys_Error(ERR_FATAL, "Couldn't load pics/colormap.pcx");
VID_Error(ERR_FATAL, "Couldn't load pics/colormap.pcx");
}
for (i = 0; i < 256; i++)

View file

@ -280,7 +280,7 @@ R_TextureMode(char *string)
if (i == NUM_GL_MODES)
{
ri.Con_Printf(PRINT_ALL, "bad filter name\n");
VID_Printf(PRINT_ALL, "bad filter name\n");
return;
}
@ -292,11 +292,11 @@ R_TextureMode(char *string)
{
if (gl_anisotropic->value > gl_config.max_anisotropy)
{
ri.Cvar_SetValue("gl_anisotropic", gl_config.max_anisotropy);
Cvar_SetValue("gl_anisotropic", gl_config.max_anisotropy);
}
else if (gl_anisotropic->value < 1.0)
{
ri.Cvar_SetValue("gl_anisotropic", 1.0);
Cvar_SetValue("gl_anisotropic", 1.0);
}
}
@ -336,7 +336,7 @@ R_TextureAlphaMode(char *string)
if (i == NUM_GL_ALPHA_MODES)
{
ri.Con_Printf(PRINT_ALL, "bad alpha texture mode name\n");
VID_Printf(PRINT_ALL, "bad alpha texture mode name\n");
return;
}
@ -358,7 +358,7 @@ R_TextureSolidMode(char *string)
if (i == NUM_GL_SOLID_MODES)
{
ri.Con_Printf(PRINT_ALL, "bad solid texture mode name\n");
VID_Printf(PRINT_ALL, "bad solid texture mode name\n");
return;
}
@ -376,7 +376,7 @@ R_ImageList_f(void)
"PAL"
};
ri.Con_Printf(PRINT_ALL, "------------------\n");
VID_Printf(PRINT_ALL, "------------------\n");
texels = 0;
for (i = 0, image = gltextures; i < numgltextures; i++, image++)
@ -391,28 +391,28 @@ R_ImageList_f(void)
switch (image->type)
{
case it_skin:
ri.Con_Printf(PRINT_ALL, "M");
VID_Printf(PRINT_ALL, "M");
break;
case it_sprite:
ri.Con_Printf(PRINT_ALL, "S");
VID_Printf(PRINT_ALL, "S");
break;
case it_wall:
ri.Con_Printf(PRINT_ALL, "W");
VID_Printf(PRINT_ALL, "W");
break;
case it_pic:
ri.Con_Printf(PRINT_ALL, "P");
VID_Printf(PRINT_ALL, "P");
break;
default:
ri.Con_Printf(PRINT_ALL, " ");
VID_Printf(PRINT_ALL, " ");
break;
}
ri.Con_Printf(PRINT_ALL, " %3i %3i %s: %s\n",
VID_Printf(PRINT_ALL, " %3i %3i %s: %s\n",
image->upload_width, image->upload_height,
palstrings[image->paletted], image->name);
}
ri.Con_Printf(PRINT_ALL,
VID_Printf(PRINT_ALL,
"Total texel count (not counting mipmaps): %i\n",
texels);
}
@ -689,7 +689,7 @@ R_Upload32(unsigned *data, int width, int height, qboolean mipmap)
if (scaled_width * scaled_height > sizeof(scaled) / 4)
{
ri.Sys_Error(ERR_DROP, "R_Upload32: too big");
VID_Error(ERR_DROP, "R_Upload32: too big");
}
/* scan the texture for any non-255 alpha */
@ -716,7 +716,7 @@ R_Upload32(unsigned *data, int width, int height, qboolean mipmap)
}
else
{
ri.Con_Printf(PRINT_ALL, "Unknown number of texture components %i\n",
VID_Printf(PRINT_ALL, "Unknown number of texture components %i\n",
samples);
comp = samples;
}
@ -850,7 +850,7 @@ R_Upload8(byte *data, int width, int height, qboolean mipmap, qboolean is_sky)
if (s > sizeof(trans) / 4)
{
ri.Sys_Error(ERR_DROP, "R_Upload8: too large");
VID_Error(ERR_DROP, "R_Upload8: too large");
}
if (qglColorTableEXT && gl_ext_palettedtexture->value && is_sky)
@ -930,7 +930,7 @@ R_LoadPic(char *name, byte *pic, int width, int realwidth,
{
if (numgltextures == MAX_GLTEXTURES)
{
ri.Sys_Error(ERR_DROP, "MAX_GLTEXTURES");
VID_Error(ERR_DROP, "MAX_GLTEXTURES");
}
numgltextures++;
@ -940,7 +940,7 @@ R_LoadPic(char *name, byte *pic, int width, int realwidth,
if (strlen(name) >= sizeof(image->name))
{
ri.Sys_Error(ERR_DROP, "Draw_LoadPic: \"%s\" is too long", name);
VID_Error(ERR_DROP, "Draw_LoadPic: \"%s\" is too long", name);
}
strcpy(image->name, name);
@ -1023,7 +1023,7 @@ R_LoadPic(char *name, byte *pic, int width, int realwidth,
}
else
{
ri.Con_Printf(PRINT_DEVELOPER,
VID_Printf(PRINT_DEVELOPER,
"Warning, image '%s' has hi-res replacement smaller than the original! (%d x %d) < (%d x %d)\n",
name, image->width, image->height, realwidth, realheight);
}
@ -1288,11 +1288,11 @@ R_InitImages(void)
registration_sequence = 1;
/* init intensity conversions */
intensity = ri.Cvar_Get("intensity", "2", CVAR_ARCHIVE);
intensity = Cvar_Get("intensity", "2", CVAR_ARCHIVE);
if (intensity->value <= 1)
{
ri.Cvar_Set("intensity", "1");
Cvar_Set("intensity", "1");
}
gl_state.inverse_intensity = 1 / intensity->value;
@ -1301,11 +1301,11 @@ R_InitImages(void)
if (qglColorTableEXT)
{
ri.FS_LoadFile("pics/16to8.dat", (void **)&gl_state.d_16to8table);
FS_LoadFile("pics/16to8.dat", (void **)&gl_state.d_16to8table);
if (!gl_state.d_16to8table)
{
ri.Sys_Error(ERR_FATAL, "Couldn't load pics/16to8.pcx");
VID_Error(ERR_FATAL, "Couldn't load pics/16to8.pcx");
}
}

View file

@ -488,7 +488,7 @@ R_BuildLightMap(msurface_t *surf, byte *dest, int stride)
if (surf->texinfo->flags &
(SURF_SKY | SURF_TRANS33 | SURF_TRANS66 | SURF_WARP))
{
ri.Sys_Error(ERR_DROP, "R_BuildLightMap called for non-lit surface");
VID_Error(ERR_DROP, "R_BuildLightMap called for non-lit surface");
}
smax = (surf->extents[0] >> 4) + 1;
@ -497,7 +497,7 @@ R_BuildLightMap(msurface_t *surf, byte *dest, int stride)
if (size > (sizeof(s_blocklights) >> 4))
{
ri.Sys_Error(ERR_DROP, "Bad s_blocklights size");
VID_Error(ERR_DROP, "Bad s_blocklights size");
}
/* set to full bright if no light data */

View file

@ -80,7 +80,7 @@ LM_UploadBlock(qboolean dynamic)
if (++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS)
{
ri.Sys_Error(ERR_DROP,
VID_Error(ERR_DROP,
"LM_UploadBlock() - MAX_LIGHTMAPS exceeded\n");
}
}
@ -226,7 +226,7 @@ LM_CreateSurfaceLightmap(msurface_t *surf)
if (!LM_AllocBlock(smax, tmax, &surf->light_s, &surf->light_t))
{
ri.Sys_Error(ERR_FATAL, "Consecutive calls to LM_AllocBlock(%d,%d) failed\n",
VID_Error(ERR_FATAL, "Consecutive calls to LM_AllocBlock(%d,%d) failed\n",
smax, tmax);
}
}

View file

@ -28,19 +28,8 @@
#define NUM_BEAM_SEGS 6
void R_Clear(void);
void Draw_Pic(int x, int y, char *name);
void Draw_Char(int x, int y, int c);
void Draw_TileClear(int x, int y, int w, int h, char *name);
void Draw_Fill(int x, int y, int w, int h, int c);
void Draw_FadeScreen(void);
viddef_t vid;
refimport_t ri;
int QGL_TEXTURE0, QGL_TEXTURE1;
model_t *r_worldmodel;
@ -365,7 +354,7 @@ R_DrawEntitiesOnList(void)
R_DrawSpriteModel(currententity);
break;
default:
ri.Sys_Error(ERR_DROP, "Bad modeltype");
VID_Error(ERR_DROP, "Bad modeltype");
break;
}
}
@ -411,7 +400,7 @@ R_DrawEntitiesOnList(void)
R_DrawSpriteModel(currententity);
break;
default:
ri.Sys_Error(ERR_DROP, "Bad modeltype");
VID_Error(ERR_DROP, "Bad modeltype");
break;
}
}
@ -849,7 +838,7 @@ R_RenderView(refdef_t *fd)
if (!r_worldmodel && !(r_newrefdef.rdflags & RDF_NOWORLDMODEL))
{
ri.Sys_Error(ERR_DROP, "R_RenderView: NULL worldmodel");
VID_Error(ERR_DROP, "R_RenderView: NULL worldmodel");
}
if (gl_speeds->value)
@ -887,7 +876,7 @@ R_RenderView(refdef_t *fd)
if (gl_speeds->value)
{
ri.Con_Printf(PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n",
VID_Printf(PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n",
c_brush_polys, c_alias_polys, c_visible_textures,
c_visible_lightmaps);
}
@ -960,88 +949,88 @@ R_RenderFrame(refdef_t *fd)
void
R_Register(void)
{
gl_lefthand = ri.Cvar_Get("hand", "0", CVAR_USERINFO | CVAR_ARCHIVE);
gl_farsee = ri.Cvar_Get("gl_farsee", "0", CVAR_LATCH | CVAR_ARCHIVE);
gl_norefresh = ri.Cvar_Get("gl_norefresh", "0", 0);
gl_fullbright = ri.Cvar_Get("gl_fullbright", "0", 0);
gl_drawentities = ri.Cvar_Get("gl_drawentities", "1", 0);
gl_drawworld = ri.Cvar_Get("gl_drawworld", "1", 0);
gl_novis = ri.Cvar_Get("gl_novis", "0", 0);
gl_nocull = ri.Cvar_Get("gl_nocull", "0", 0);
gl_lerpmodels = ri.Cvar_Get("gl_lerpmodels", "1", 0);
gl_speeds = ri.Cvar_Get("gl_speeds", "0", 0);
gl_lefthand = Cvar_Get("hand", "0", CVAR_USERINFO | CVAR_ARCHIVE);
gl_farsee = Cvar_Get("gl_farsee", "0", CVAR_LATCH | CVAR_ARCHIVE);
gl_norefresh = Cvar_Get("gl_norefresh", "0", 0);
gl_fullbright = Cvar_Get("gl_fullbright", "0", 0);
gl_drawentities = Cvar_Get("gl_drawentities", "1", 0);
gl_drawworld = Cvar_Get("gl_drawworld", "1", 0);
gl_novis = Cvar_Get("gl_novis", "0", 0);
gl_nocull = Cvar_Get("gl_nocull", "0", 0);
gl_lerpmodels = Cvar_Get("gl_lerpmodels", "1", 0);
gl_speeds = Cvar_Get("gl_speeds", "0", 0);
gl_lightlevel = ri.Cvar_Get("gl_lightlevel", "0", 0);
gl_overbrightbits = ri.Cvar_Get("gl_overbrightbits", "2", CVAR_ARCHIVE);
gl_lightlevel = Cvar_Get("gl_lightlevel", "0", 0);
gl_overbrightbits = Cvar_Get("gl_overbrightbits", "2", CVAR_ARCHIVE);
gl_nosubimage = ri.Cvar_Get("gl_nosubimage", "0", 0);
gl_allow_software = ri.Cvar_Get("gl_allow_software", "0", 0);
gl_nosubimage = Cvar_Get("gl_nosubimage", "0", 0);
gl_allow_software = Cvar_Get("gl_allow_software", "0", 0);
gl_particle_min_size = ri.Cvar_Get("gl_particle_min_size", "2", CVAR_ARCHIVE);
gl_particle_max_size = ri.Cvar_Get("gl_particle_max_size", "40", CVAR_ARCHIVE);
gl_particle_size = ri.Cvar_Get("gl_particle_size", "40", CVAR_ARCHIVE);
gl_particle_att_a = ri.Cvar_Get("gl_particle_att_a", "0.01", CVAR_ARCHIVE);
gl_particle_att_b = ri.Cvar_Get("gl_particle_att_b", "0.0", CVAR_ARCHIVE);
gl_particle_att_c = ri.Cvar_Get("gl_particle_att_c", "0.01", CVAR_ARCHIVE);
gl_particle_min_size = Cvar_Get("gl_particle_min_size", "2", CVAR_ARCHIVE);
gl_particle_max_size = Cvar_Get("gl_particle_max_size", "40", CVAR_ARCHIVE);
gl_particle_size = Cvar_Get("gl_particle_size", "40", CVAR_ARCHIVE);
gl_particle_att_a = Cvar_Get("gl_particle_att_a", "0.01", CVAR_ARCHIVE);
gl_particle_att_b = Cvar_Get("gl_particle_att_b", "0.0", CVAR_ARCHIVE);
gl_particle_att_c = Cvar_Get("gl_particle_att_c", "0.01", CVAR_ARCHIVE);
gl_modulate = ri.Cvar_Get("gl_modulate", "1", CVAR_ARCHIVE);
gl_log = ri.Cvar_Get("gl_log", "0", 0);
gl_bitdepth = ri.Cvar_Get("gl_bitdepth", "0", 0);
gl_mode = ri.Cvar_Get("gl_mode", "4", CVAR_ARCHIVE);
gl_lightmap = ri.Cvar_Get("gl_lightmap", "0", 0);
gl_shadows = ri.Cvar_Get("gl_shadows", "0", CVAR_ARCHIVE);
gl_stencilshadow = ri.Cvar_Get("gl_stencilshadow", "0", CVAR_ARCHIVE);
gl_dynamic = ri.Cvar_Get("gl_dynamic", "1", 0);
gl_nobind = ri.Cvar_Get("gl_nobind", "0", 0);
gl_round_down = ri.Cvar_Get("gl_round_down", "1", 0);
gl_picmip = ri.Cvar_Get("gl_picmip", "0", 0);
gl_skymip = ri.Cvar_Get("gl_skymip", "0", 0);
gl_showtris = ri.Cvar_Get("gl_showtris", "0", 0);
gl_ztrick = ri.Cvar_Get("gl_ztrick", "0", 0);
gl_zfix = ri.Cvar_Get("gl_zfix", "0", 0);
gl_finish = ri.Cvar_Get("gl_finish", "0", CVAR_ARCHIVE);
gl_clear = ri.Cvar_Get("gl_clear", "0", 0);
gl_cull = ri.Cvar_Get("gl_cull", "1", 0);
gl_polyblend = ri.Cvar_Get("gl_polyblend", "1", 0);
gl_flashblend = ri.Cvar_Get("gl_flashblend", "0", 0);
gl_playermip = ri.Cvar_Get("gl_playermip", "0", 0);
gl_driver = ri.Cvar_Get("gl_driver", LIBGL, CVAR_ARCHIVE);
gl_modulate = Cvar_Get("gl_modulate", "1", CVAR_ARCHIVE);
gl_log = Cvar_Get("gl_log", "0", 0);
gl_bitdepth = Cvar_Get("gl_bitdepth", "0", 0);
gl_mode = Cvar_Get("gl_mode", "4", CVAR_ARCHIVE);
gl_lightmap = Cvar_Get("gl_lightmap", "0", 0);
gl_shadows = Cvar_Get("gl_shadows", "0", CVAR_ARCHIVE);
gl_stencilshadow = Cvar_Get("gl_stencilshadow", "0", CVAR_ARCHIVE);
gl_dynamic = Cvar_Get("gl_dynamic", "1", 0);
gl_nobind = Cvar_Get("gl_nobind", "0", 0);
gl_round_down = Cvar_Get("gl_round_down", "1", 0);
gl_picmip = Cvar_Get("gl_picmip", "0", 0);
gl_skymip = Cvar_Get("gl_skymip", "0", 0);
gl_showtris = Cvar_Get("gl_showtris", "0", 0);
gl_ztrick = Cvar_Get("gl_ztrick", "0", 0);
gl_zfix = Cvar_Get("gl_zfix", "0", 0);
gl_finish = Cvar_Get("gl_finish", "0", CVAR_ARCHIVE);
gl_clear = Cvar_Get("gl_clear", "0", 0);
gl_cull = Cvar_Get("gl_cull", "1", 0);
gl_polyblend = Cvar_Get("gl_polyblend", "1", 0);
gl_flashblend = Cvar_Get("gl_flashblend", "0", 0);
gl_playermip = Cvar_Get("gl_playermip", "0", 0);
gl_driver = Cvar_Get("gl_driver", LIBGL, CVAR_ARCHIVE);
gl_texturemode = ri.Cvar_Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", CVAR_ARCHIVE);
gl_texturealphamode = ri.Cvar_Get("gl_texturealphamode", "default", CVAR_ARCHIVE);
gl_texturesolidmode = ri.Cvar_Get("gl_texturesolidmode", "default", CVAR_ARCHIVE);
gl_anisotropic = ri.Cvar_Get("gl_anisotropic", "0", CVAR_ARCHIVE);
gl_anisotropic_avail = ri.Cvar_Get("gl_anisotropic_avail", "0", 0);
gl_lockpvs = ri.Cvar_Get("gl_lockpvs", "0", 0);
gl_texturemode = Cvar_Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", CVAR_ARCHIVE);
gl_texturealphamode = Cvar_Get("gl_texturealphamode", "default", CVAR_ARCHIVE);
gl_texturesolidmode = Cvar_Get("gl_texturesolidmode", "default", CVAR_ARCHIVE);
gl_anisotropic = Cvar_Get("gl_anisotropic", "0", CVAR_ARCHIVE);
gl_anisotropic_avail = Cvar_Get("gl_anisotropic_avail", "0", 0);
gl_lockpvs = Cvar_Get("gl_lockpvs", "0", 0);
gl_vertex_arrays = ri.Cvar_Get("gl_vertex_arrays", "0", CVAR_ARCHIVE);
gl_vertex_arrays = Cvar_Get("gl_vertex_arrays", "0", CVAR_ARCHIVE);
gl_ext_swapinterval = ri.Cvar_Get("gl_ext_swapinterval", "1", CVAR_ARCHIVE);
gl_ext_palettedtexture = ri.Cvar_Get("gl_ext_palettedtexture", "0", CVAR_ARCHIVE);
gl_ext_multitexture = ri.Cvar_Get("gl_ext_multitexture", "1", CVAR_ARCHIVE);
gl_ext_pointparameters = ri.Cvar_Get("gl_ext_pointparameters", "1", CVAR_ARCHIVE);
gl_ext_compiled_vertex_array = ri.Cvar_Get("gl_ext_compiled_vertex_array", "1", CVAR_ARCHIVE);
gl_ext_mtexcombine = ri.Cvar_Get("gl_ext_mtexcombine", "1", CVAR_ARCHIVE);
gl_ext_swapinterval = Cvar_Get("gl_ext_swapinterval", "1", CVAR_ARCHIVE);
gl_ext_palettedtexture = Cvar_Get("gl_ext_palettedtexture", "0", CVAR_ARCHIVE);
gl_ext_multitexture = Cvar_Get("gl_ext_multitexture", "1", CVAR_ARCHIVE);
gl_ext_pointparameters = Cvar_Get("gl_ext_pointparameters", "1", CVAR_ARCHIVE);
gl_ext_compiled_vertex_array = Cvar_Get("gl_ext_compiled_vertex_array", "1", CVAR_ARCHIVE);
gl_ext_mtexcombine = Cvar_Get("gl_ext_mtexcombine", "1", CVAR_ARCHIVE);
gl_drawbuffer = ri.Cvar_Get("gl_drawbuffer", "GL_BACK", 0);
gl_swapinterval = ri.Cvar_Get("gl_swapinterval", "1", CVAR_ARCHIVE);
gl_drawbuffer = Cvar_Get("gl_drawbuffer", "GL_BACK", 0);
gl_swapinterval = Cvar_Get("gl_swapinterval", "1", CVAR_ARCHIVE);
gl_saturatelighting = ri.Cvar_Get("gl_saturatelighting", "0", 0);
gl_saturatelighting = Cvar_Get("gl_saturatelighting", "0", 0);
vid_fullscreen = ri.Cvar_Get("vid_fullscreen", "0", CVAR_ARCHIVE);
vid_gamma = ri.Cvar_Get("vid_gamma", "1.0", CVAR_ARCHIVE);
vid_fullscreen = Cvar_Get("vid_fullscreen", "0", CVAR_ARCHIVE);
vid_gamma = Cvar_Get("vid_gamma", "1.0", CVAR_ARCHIVE);
gl_customwidth = ri.Cvar_Get("gl_customwidth", "1024", CVAR_ARCHIVE);
gl_customheight = ri.Cvar_Get("gl_customheight", "768", CVAR_ARCHIVE);
gl_customwidth = Cvar_Get("gl_customwidth", "1024", CVAR_ARCHIVE);
gl_customheight = Cvar_Get("gl_customheight", "768", CVAR_ARCHIVE);
#ifdef RETEXTURE
gl_retexturing = ri.Cvar_Get("gl_retexturing", "1", CVAR_ARCHIVE);
gl_retexturing = Cvar_Get("gl_retexturing", "1", CVAR_ARCHIVE);
#endif
ri.Cmd_AddCommand("imagelist", R_ImageList_f);
ri.Cmd_AddCommand("screenshot", R_ScreenShot);
ri.Cmd_AddCommand("modellist", Mod_Modellist_f);
ri.Cmd_AddCommand("gl_strings", R_Strings);
Cmd_AddCommand("imagelist", R_ImageList_f);
Cmd_AddCommand("screenshot", R_ScreenShot);
Cmd_AddCommand("modellist", Mod_Modellist_f);
Cmd_AddCommand("gl_strings", R_Strings);
}
qboolean
@ -1076,9 +1065,9 @@ R_SetMode(void)
{
if (err == rserr_invalid_fullscreen)
{
ri.Cvar_SetValue("vid_fullscreen", 0);
Cvar_SetValue("vid_fullscreen", 0);
vid_fullscreen->modified = false;
ri.Con_Printf(PRINT_ALL, "ref_gl::R_SetMode() - fullscreen unavailable in this mode\n");
VID_Printf(PRINT_ALL, "ref_gl::R_SetMode() - fullscreen unavailable in this mode\n");
if ((err = GLimp_SetMode(&vid.width, &vid.height, gl_mode->value, false)) == rserr_ok)
{
@ -1087,15 +1076,15 @@ R_SetMode(void)
}
else if (err == rserr_invalid_mode)
{
ri.Cvar_SetValue("gl_mode", gl_state.prev_mode);
Cvar_SetValue("gl_mode", gl_state.prev_mode);
gl_mode->modified = false;
ri.Con_Printf(PRINT_ALL, "ref_gl::R_SetMode() - invalid mode\n");
VID_Printf(PRINT_ALL, "ref_gl::R_SetMode() - invalid mode\n");
}
/* try setting it back to something safe */
if ((err =GLimp_SetMode(&vid.width, &vid.height, gl_state.prev_mode, false)) != rserr_ok)
{
ri.Con_Printf(PRINT_ALL, "ref_gl::R_SetMode() - could not revert to safe mode\n");
VID_Printf(PRINT_ALL, "ref_gl::R_SetMode() - could not revert to safe mode\n");
return false;
}
}
@ -1112,25 +1101,27 @@ R_Init(void *hinstance, void *hWnd)
int j;
extern float r_turbsin[256];
Swap_Init();
for (j = 0; j < 256; j++)
{
r_turbsin[j] *= 0.5;
}
/* Options */
ri.Con_Printf(PRINT_ALL, "Refresher build options:\n");
VID_Printf(PRINT_ALL, "Refresher build options:\n");
#ifdef RETEXTURE
ri.Con_Printf(PRINT_ALL, " + Retexturing support\n");
VID_Printf(PRINT_ALL, " + Retexturing support\n");
#else
ri.Con_Printf(PRINT_ALL, " - Retexturing support\n");
VID_Printf(PRINT_ALL, " - Retexturing support\n");
#endif
#ifdef X11GAMMA
ri.Con_Printf(PRINT_ALL, " + Gamma via X11\n");
VID_Printf(PRINT_ALL, " + Gamma via X11\n");
#else
ri.Con_Printf(PRINT_ALL, " - Gamma via X11\n");
VID_Printf(PRINT_ALL, " - Gamma via X11\n");
#endif
ri.Con_Printf(PRINT_ALL, "Refresh: " REF_VERSION "\n");
VID_Printf(PRINT_ALL, "Refresh: " REF_VERSION "\n");
Draw_GetPalette();
@ -1140,7 +1131,7 @@ R_Init(void *hinstance, void *hWnd)
if (!QGL_Init(gl_driver->string))
{
QGL_Shutdown();
ri.Con_Printf(PRINT_ALL, "ref_gl::R_Init() - could not load \"%s\"\n",
VID_Printf(PRINT_ALL, "ref_gl::R_Init() - could not load \"%s\"\n",
gl_driver->string);
return -1;
}
@ -1159,22 +1150,22 @@ R_Init(void *hinstance, void *hWnd)
if (!R_SetMode())
{
QGL_Shutdown();
ri.Con_Printf(PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n");
VID_Printf(PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n");
return -1;
}
ri.Vid_MenuInit();
VID_MenuInit();
/* get our various GL strings */
ri.Con_Printf(PRINT_ALL, "\nOpenGL setting:\n", gl_config.vendor_string);
VID_Printf(PRINT_ALL, "\nOpenGL setting:\n", gl_config.vendor_string);
gl_config.vendor_string = (char *)qglGetString(GL_VENDOR);
ri.Con_Printf(PRINT_ALL, "GL_VENDOR: %s\n", gl_config.vendor_string);
VID_Printf(PRINT_ALL, "GL_VENDOR: %s\n", gl_config.vendor_string);
gl_config.renderer_string = (char *)qglGetString(GL_RENDERER);
ri.Con_Printf(PRINT_ALL, "GL_RENDERER: %s\n", gl_config.renderer_string);
VID_Printf(PRINT_ALL, "GL_RENDERER: %s\n", gl_config.renderer_string);
gl_config.version_string = (char *)qglGetString(GL_VERSION);
ri.Con_Printf(PRINT_ALL, "GL_VERSION: %s\n", gl_config.version_string);
VID_Printf(PRINT_ALL, "GL_VERSION: %s\n", gl_config.version_string);
gl_config.extensions_string = (char *)qglGetString(GL_EXTENSIONS);
ri.Con_Printf(PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string);
VID_Printf(PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string);
Q_strlcpy(renderer_buffer, gl_config.renderer_string, sizeof(renderer_buffer));
Q_strlwr(renderer_buffer);
@ -1182,29 +1173,29 @@ R_Init(void *hinstance, void *hWnd)
Q_strlcpy(vendor_buffer, gl_config.vendor_string, sizeof(vendor_buffer));
Q_strlwr(vendor_buffer);
ri.Cvar_Set("scr_drawall", "0");
Cvar_Set("scr_drawall", "0");
gl_config.allow_cds = true;
ri.Con_Printf(PRINT_ALL, "\n\nProbing for OpenGL extensions:\n");
VID_Printf(PRINT_ALL, "\n\nProbing for OpenGL extensions:\n");
/* grab extensions */
if (strstr(gl_config.extensions_string, "GL_EXT_compiled_vertex_array") ||
strstr(gl_config.extensions_string, "GL_SGI_compiled_vertex_array"))
{
ri.Con_Printf(PRINT_ALL, "...using GL_EXT_compiled_vertex_array\n");
VID_Printf(PRINT_ALL, "...using GL_EXT_compiled_vertex_array\n");
qglLockArraysEXT = (void *)GetProcAddressGL("glLockArraysEXT");
qglUnlockArraysEXT = (void *)GetProcAddressGL("glUnlockArraysEXT");
}
else
{
ri.Con_Printf(PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n");
VID_Printf(PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n");
}
if (strstr(gl_config.extensions_string, "GL_EXT_point_parameters"))
{
if (gl_ext_pointparameters->value)
{
ri.Con_Printf(PRINT_ALL, "...using GL_EXT_point_parameters\n");
VID_Printf(PRINT_ALL, "...using GL_EXT_point_parameters\n");
qglPointParameterfEXT = (void (APIENTRY *)(GLenum, GLfloat))
GetProcAddressGL("glPointParameterfEXT");
qglPointParameterfvEXT = (void (APIENTRY *)(GLenum, const GLfloat *))
@ -1212,12 +1203,12 @@ R_Init(void *hinstance, void *hWnd)
}
else
{
ri.Con_Printf(PRINT_ALL, "...ignoring GL_EXT_point_parameters\n");
VID_Printf(PRINT_ALL, "...ignoring GL_EXT_point_parameters\n");
}
}
else
{
ri.Con_Printf(PRINT_ALL, "...GL_EXT_point_parameters not found\n");
VID_Printf(PRINT_ALL, "...GL_EXT_point_parameters not found\n");
}
if (!qglColorTableEXT &&
@ -1226,7 +1217,7 @@ R_Init(void *hinstance, void *hWnd)
{
if (gl_ext_palettedtexture->value)
{
ri.Con_Printf(PRINT_ALL, "...using GL_EXT_shared_texture_palette\n");
VID_Printf(PRINT_ALL, "...using GL_EXT_shared_texture_palette\n");
qglColorTableEXT =
(void (APIENTRY *)(GLenum, GLenum, GLsizei, GLenum, GLenum,
const GLvoid *))GetProcAddressGL(
@ -1234,19 +1225,19 @@ R_Init(void *hinstance, void *hWnd)
}
else
{
ri.Con_Printf(PRINT_ALL, "...ignoring GL_EXT_shared_texture_palette\n");
VID_Printf(PRINT_ALL, "...ignoring GL_EXT_shared_texture_palette\n");
}
}
else
{
ri.Con_Printf(PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n");
VID_Printf(PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n");
}
if (strstr(gl_config.extensions_string, "GL_ARB_multitexture"))
{
if (gl_ext_multitexture->value)
{
ri.Con_Printf(PRINT_ALL, "...using GL_ARB_multitexture\n");
VID_Printf(PRINT_ALL, "...using GL_ARB_multitexture\n");
qglMTexCoord2fSGIS = (void *)GetProcAddressGL("glMultiTexCoord2fARB");
qglActiveTextureARB = (void *)GetProcAddressGL("glActiveTextureARB");
qglClientActiveTextureARB = (void *)GetProcAddressGL("glClientActiveTextureARB");
@ -1255,23 +1246,23 @@ R_Init(void *hinstance, void *hWnd)
}
else
{
ri.Con_Printf(PRINT_ALL, "...ignoring GL_ARB_multitexture\n");
VID_Printf(PRINT_ALL, "...ignoring GL_ARB_multitexture\n");
}
}
else
{
ri.Con_Printf(PRINT_ALL, "...GL_ARB_multitexture not found\n");
VID_Printf(PRINT_ALL, "...GL_ARB_multitexture not found\n");
}
if (strstr(gl_config.extensions_string, "GL_SGIS_multitexture"))
{
if (qglActiveTextureARB)
{
ri.Con_Printf(PRINT_ALL, "...GL_SGIS_multitexture deprecated in favor of ARB_multitexture\n");
VID_Printf(PRINT_ALL, "...GL_SGIS_multitexture deprecated in favor of ARB_multitexture\n");
}
else if (gl_ext_multitexture->value)
{
ri.Con_Printf(PRINT_ALL, "...using GL_SGIS_multitexture\n");
VID_Printf(PRINT_ALL, "...using GL_SGIS_multitexture\n");
qglMTexCoord2fSGIS = (void *)GetProcAddressGL("glMTexCoord2fSGIS");
qglSelectTextureSGIS = (void *)GetProcAddressGL("glSelectTextureSGIS");
QGL_TEXTURE0 = GL_TEXTURE0_SGIS;
@ -1279,29 +1270,29 @@ R_Init(void *hinstance, void *hWnd)
}
else
{
ri.Con_Printf(PRINT_ALL, "...ignoring GL_SGIS_multitexture\n");
VID_Printf(PRINT_ALL, "...ignoring GL_SGIS_multitexture\n");
}
}
else
{
ri.Con_Printf(PRINT_ALL, "...GL_SGIS_multitexture not found\n");
VID_Printf(PRINT_ALL, "...GL_SGIS_multitexture not found\n");
}
gl_config.anisotropic = false;
if (strstr(gl_config.extensions_string, "GL_EXT_texture_filter_anisotropic"))
{
ri.Con_Printf(PRINT_ALL, "...using GL_EXT_texture_filter_anisotropic\n");
VID_Printf(PRINT_ALL, "...using GL_EXT_texture_filter_anisotropic\n");
gl_config.anisotropic = true;
qglGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl_config.max_anisotropy);
ri.Cvar_SetValue("gl_anisotropic_avail", gl_config.max_anisotropy);
Cvar_SetValue("gl_anisotropic_avail", gl_config.max_anisotropy);
}
else
{
ri.Con_Printf(PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n");
VID_Printf(PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n");
gl_config.anisotropic = false;
gl_config.max_anisotropy = 0.0;
ri.Cvar_SetValue("gl_anisotropic_avail", 0.0);
Cvar_SetValue("gl_anisotropic_avail", 0.0);
}
gl_config.mtexcombine = false;
@ -1310,17 +1301,17 @@ R_Init(void *hinstance, void *hWnd)
{
if (gl_ext_mtexcombine->value)
{
ri.Con_Printf(PRINT_ALL, "...using GL_ARB_texture_env_combine\n");
VID_Printf(PRINT_ALL, "...using GL_ARB_texture_env_combine\n");
gl_config.mtexcombine = true;
}
else
{
ri.Con_Printf(PRINT_ALL, "...ignoring GL_ARB_texture_env_combine\n");
VID_Printf(PRINT_ALL, "...ignoring GL_ARB_texture_env_combine\n");
}
}
else
{
ri.Con_Printf(PRINT_ALL, "...GL_ARB_texture_env_combine not found\n");
VID_Printf(PRINT_ALL, "...GL_ARB_texture_env_combine not found\n");
}
if (!gl_config.mtexcombine)
@ -1329,17 +1320,17 @@ R_Init(void *hinstance, void *hWnd)
{
if (gl_ext_mtexcombine->value)
{
ri.Con_Printf(PRINT_ALL, "...using GL_EXT_texture_env_combine\n");
VID_Printf(PRINT_ALL, "...using GL_EXT_texture_env_combine\n");
gl_config.mtexcombine = true;
}
else
{
ri.Con_Printf(PRINT_ALL, "...ignoring GL_EXT_texture_env_combine\n");
VID_Printf(PRINT_ALL, "...ignoring GL_EXT_texture_env_combine\n");
}
}
else
{
ri.Con_Printf(PRINT_ALL, "...GL_EXT_texture_env_combine not found\n");
VID_Printf(PRINT_ALL, "...GL_EXT_texture_env_combine not found\n");
}
}
@ -1354,7 +1345,7 @@ R_Init(void *hinstance, void *hWnd)
if (err != GL_NO_ERROR)
{
ri.Con_Printf(PRINT_ALL, "glGetError() = 0x%x\n", err);
VID_Printf(PRINT_ALL, "glGetError() = 0x%x\n", err);
}
return true;
@ -1363,10 +1354,10 @@ R_Init(void *hinstance, void *hWnd)
void
R_Shutdown(void)
{
ri.Cmd_RemoveCommand("modellist");
ri.Cmd_RemoveCommand("screenshot");
ri.Cmd_RemoveCommand("imagelist");
ri.Cmd_RemoveCommand("gl_strings");
Cmd_RemoveCommand("modellist");
Cmd_RemoveCommand("screenshot");
Cmd_RemoveCommand("imagelist");
Cmd_RemoveCommand("gl_strings");
Mod_FreeAll();
@ -1573,77 +1564,10 @@ R_DrawBeam(entity_t *e)
qglDepthMask(GL_TRUE);
}
//refexport_t
void *
R_GetRefAPI(refimport_t rimp)
{
//refexport_t re;
ri = rimp;
/*re.api_version = API_VERSION;
re.BeginRegistration = R_BeginRegistration;
re.RegisterModel = R_RegisterModel;
re.RegisterSkin = R_RegisterSkin;
re.RegisterPic = Draw_FindPic;
re.SetSky = R_SetSky;
re.EndRegistration = R_EndRegistration;
re.RenderFrame = R_RenderFrame;
re.DrawGetPicSize = Draw_GetPicSize;
re.DrawPic = Draw_Pic;
re.DrawStretchPic = Draw_StretchPic;
re.DrawChar = Draw_Char;
re.DrawTileClear = Draw_TileClear;
re.DrawFill = Draw_Fill;
re.DrawFadeScreen = Draw_FadeScreen;
re.DrawStretchRaw = Draw_StretchRaw;
re.Init = R_Init;
re.Shutdown = R_Shutdown;
re.CinematicSetPalette = R_SetPalette;
re.BeginFrame = R_BeginFrame;
re.EndFrame = GLimp_EndFrame;
re.AppActivate = NULL;*/
Swap_Init();
//return re;
return NULL;
}
/*
* this is only here so the functions
* in shared source files can link
*/
/*void
Sys_Error(char *error, ...)
R_GetRefAPI(void)
{
va_list argptr;
char text[1024];
va_start(argptr, error);
vsprintf(text, error, argptr);
va_end(argptr);
ri.Sys_Error(ERR_FATAL, "%s", text);
}
void
Com_Printf(char *fmt, ...)
{
va_list argptr;
char text[1024];
va_start(argptr, fmt);
vsprintf(text, fmt, argptr);
va_end(argptr);
ri.Con_Printf(PRINT_ALL, "%s", text);
Swap_Init();
}*/

View file

@ -390,14 +390,14 @@ R_CullAliasModel(vec3_t bbox[8], entity_t *e)
if ((e->frame >= paliashdr->num_frames) || (e->frame < 0))
{
ri.Con_Printf(PRINT_ALL, "R_CullAliasModel %s: no such frame %d\n",
VID_Printf(PRINT_ALL, "R_CullAliasModel %s: no such frame %d\n",
currentmodel->name, e->frame);
e->frame = 0;
}
if ((e->oldframe >= paliashdr->num_frames) || (e->oldframe < 0))
{
ri.Con_Printf(PRINT_ALL, "R_CullAliasModel %s: no such oldframe %d\n",
VID_Printf(PRINT_ALL, "R_CullAliasModel %s: no such oldframe %d\n",
currentmodel->name, e->oldframe);
e->oldframe = 0;
}
@ -760,7 +760,7 @@ R_DrawAliasModel(entity_t *e)
if ((currententity->frame >= paliashdr->num_frames) ||
(currententity->frame < 0))
{
ri.Con_Printf(PRINT_ALL, "R_DrawAliasModel %s: no such frame %d\n",
VID_Printf(PRINT_ALL, "R_DrawAliasModel %s: no such frame %d\n",
currentmodel->name, currententity->frame);
currententity->frame = 0;
currententity->oldframe = 0;
@ -769,7 +769,7 @@ R_DrawAliasModel(entity_t *e)
if ((currententity->oldframe >= paliashdr->num_frames) ||
(currententity->oldframe < 0))
{
ri.Con_Printf(PRINT_ALL, "R_DrawAliasModel %s: no such oldframe %d\n",
VID_Printf(PRINT_ALL, "R_DrawAliasModel %s: no such oldframe %d\n",
currentmodel->name, currententity->oldframe);
currententity->frame = 0;
currententity->oldframe = 0;

View file

@ -93,8 +93,8 @@ R_ScreenShot(void)
FILE *f;
/* create the scrnshots directory if it doesn't exist */
Com_sprintf(checkname, sizeof(checkname), "%s/scrnshot", ri.FS_Gamedir());
ri.Sys_Mkdir(checkname);
Com_sprintf(checkname, sizeof(checkname), "%s/scrnshot", FS_Gamedir());
Sys_Mkdir(checkname);
/* find a file name to save it to */
strcpy(picname, "quake00.tga");
@ -104,7 +104,7 @@ R_ScreenShot(void)
picname[5] = i / 10 + '0';
picname[6] = i % 10 + '0';
Com_sprintf(checkname, sizeof(checkname), "%s/scrnshot/%s",
ri.FS_Gamedir(), picname);
FS_Gamedir(), picname);
f = fopen(checkname, "rb");
if (!f)
@ -117,7 +117,7 @@ R_ScreenShot(void)
if (i == 100)
{
ri.Con_Printf(PRINT_ALL, "SCR_ScreenShot_f: Couldn't create a file\n");
VID_Printf(PRINT_ALL, "SCR_ScreenShot_f: Couldn't create a file\n");
return;
}
@ -148,16 +148,16 @@ R_ScreenShot(void)
fclose(f);
free(buffer);
ri.Con_Printf(PRINT_ALL, "Wrote %s\n", picname);
VID_Printf(PRINT_ALL, "Wrote %s\n", picname);
}
void
R_Strings(void)
{
ri.Con_Printf(PRINT_ALL, "GL_VENDOR: %s\n", gl_config.vendor_string);
ri.Con_Printf(PRINT_ALL, "GL_RENDERER: %s\n", gl_config.renderer_string);
ri.Con_Printf(PRINT_ALL, "GL_VERSION: %s\n", gl_config.version_string);
ri.Con_Printf(PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string);
VID_Printf(PRINT_ALL, "GL_VENDOR: %s\n", gl_config.vendor_string);
VID_Printf(PRINT_ALL, "GL_RENDERER: %s\n", gl_config.renderer_string);
VID_Printf(PRINT_ALL, "GL_VERSION: %s\n", gl_config.version_string);
VID_Printf(PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string);
}
void

View file

@ -57,7 +57,7 @@ Mod_PointInLeaf(vec3_t p, model_t *model)
if (!model || !model->nodes)
{
ri.Sys_Error(ERR_DROP, "Mod_PointInLeaf: bad model");
VID_Error(ERR_DROP, "Mod_PointInLeaf: bad model");
}
node = model->nodes;
@ -151,7 +151,7 @@ Mod_Modellist_f(void)
int total;
total = 0;
ri.Con_Printf(PRINT_ALL, "Loaded models:\n");
VID_Printf(PRINT_ALL, "Loaded models:\n");
for (i = 0, mod = mod_known; i < mod_numknown; i++, mod++)
{
@ -160,11 +160,11 @@ Mod_Modellist_f(void)
continue;
}
ri.Con_Printf(PRINT_ALL, "%8i : %s\n", mod->extradatasize, mod->name);
VID_Printf(PRINT_ALL, "%8i : %s\n", mod->extradatasize, mod->name);
total += mod->extradatasize;
}
ri.Con_Printf(PRINT_ALL, "Total resident: %i\n", total);
VID_Printf(PRINT_ALL, "Total resident: %i\n", total);
}
void
@ -185,7 +185,7 @@ Mod_ForName(char *name, qboolean crash)
if (!name[0])
{
ri.Sys_Error(ERR_DROP, "Mod_ForName: NULL name");
VID_Error(ERR_DROP, "Mod_ForName: NULL name");
}
/* inline models are grabbed only from worldmodel */
@ -195,7 +195,7 @@ Mod_ForName(char *name, qboolean crash)
if ((i < 1) || !r_worldmodel || (i >= r_worldmodel->numsubmodels))
{
ri.Sys_Error(ERR_DROP, "bad inline model number");
VID_Error(ERR_DROP, "bad inline model number");
}
return &mod_inline[i];
@ -228,7 +228,7 @@ Mod_ForName(char *name, qboolean crash)
{
if (mod_numknown == MAX_MOD_KNOWN)
{
ri.Sys_Error(ERR_DROP, "mod_numknown == MAX_MOD_KNOWN");
VID_Error(ERR_DROP, "mod_numknown == MAX_MOD_KNOWN");
}
mod_numknown++;
@ -237,13 +237,13 @@ Mod_ForName(char *name, qboolean crash)
strcpy(mod->name, name);
/* load the file */
modfilelen = ri.FS_LoadFile(mod->name, (void **)&buf);
modfilelen = FS_LoadFile(mod->name, (void **)&buf);
if (!buf)
{
if (crash)
{
ri.Sys_Error(ERR_DROP, "Mod_NumForName: %s not found", mod->name);
VID_Error(ERR_DROP, "Mod_NumForName: %s not found", mod->name);
}
memset(mod->name, 0, sizeof(mod->name));
@ -271,7 +271,7 @@ Mod_ForName(char *name, qboolean crash)
break;
default:
ri.Sys_Error(ERR_DROP,
VID_Error(ERR_DROP,
"Mod_NumForName: unknown fileid for %s",
mod->name);
break;
@ -279,7 +279,7 @@ Mod_ForName(char *name, qboolean crash)
loadmodel->extradatasize = Hunk_End();
ri.FS_FreeFile(buf);
FS_FreeFile(buf);
return mod;
}
@ -331,7 +331,7 @@ Mod_LoadVertexes(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -374,7 +374,7 @@ Mod_LoadSubmodels(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -412,7 +412,7 @@ Mod_LoadEdges(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -442,7 +442,7 @@ Mod_LoadTexinfo(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -478,7 +478,7 @@ Mod_LoadTexinfo(lump_t *l)
if (!out->image)
{
ri.Con_Printf(PRINT_ALL, "Couldn't load %s\n", name);
VID_Printf(PRINT_ALL, "Couldn't load %s\n", name);
out->image = r_notexture;
}
}
@ -568,7 +568,7 @@ Mod_LoadFaces(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -603,7 +603,7 @@ Mod_LoadFaces(lump_t *l)
if ((ti < 0) || (ti >= loadmodel->numtexinfo))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: bad texinfo number");
VID_Error(ERR_DROP, "MOD_LoadBmodel: bad texinfo number");
}
out->texinfo = loadmodel->texinfo + ti;
@ -682,7 +682,7 @@ Mod_LoadNodes(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -736,7 +736,7 @@ Mod_LoadLeafs(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -777,7 +777,7 @@ Mod_LoadMarksurfaces(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -793,7 +793,7 @@ Mod_LoadMarksurfaces(lump_t *l)
if ((j < 0) || (j >= loadmodel->numsurfaces))
{
ri.Sys_Error(ERR_DROP, "Mod_ParseMarksurfaces: bad surface number");
VID_Error(ERR_DROP, "Mod_ParseMarksurfaces: bad surface number");
}
out[i] = loadmodel->surfaces + j;
@ -810,7 +810,7 @@ Mod_LoadSurfedges(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -818,7 +818,7 @@ Mod_LoadSurfedges(lump_t *l)
if ((count < 1) || (count >= MAX_MAP_SURFEDGES))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: bad surfedges count in %s: %i",
VID_Error(ERR_DROP, "MOD_LoadBmodel: bad surfedges count in %s: %i",
loadmodel->name, count);
}
@ -846,7 +846,7 @@ Mod_LoadPlanes(lump_t *l)
if (l->filelen % sizeof(*in))
{
ri.Sys_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",
loadmodel->name);
}
@ -887,7 +887,7 @@ Mod_LoadBrushModel(model_t *mod, void *buffer)
if (loadmodel != mod_known)
{
ri.Sys_Error(ERR_DROP, "Loaded a brush model after the world");
VID_Error(ERR_DROP, "Loaded a brush model after the world");
}
header = (dheader_t *)buffer;
@ -896,7 +896,7 @@ Mod_LoadBrushModel(model_t *mod, void *buffer)
if (i != BSPVERSION)
{
ri.Sys_Error(ERR_DROP, "Mod_LoadBrushModel: %s has wrong version number (%i should be %i)",
VID_Error(ERR_DROP, "Mod_LoadBrushModel: %s has wrong version number (%i should be %i)",
mod->name, i, BSPVERSION);
}
@ -939,7 +939,7 @@ Mod_LoadBrushModel(model_t *mod, void *buffer)
if (starmod->firstnode >= loadmodel->numnodes)
{
ri.Sys_Error(ERR_DROP, "Inline model %i has bad firstnode", i);
VID_Error(ERR_DROP, "Inline model %i has bad firstnode", i);
}
VectorCopy(bm->maxs, starmod->maxs);
@ -993,7 +993,7 @@ R_BeginRegistration(char *model)
/* explicitly free the old map if different
this guarantees that mod_known[0] is the
world map */
flushmap = ri.Cvar_Get("flushmap", "0", 0);
flushmap = Cvar_Get("flushmap", "0", 0);
if (strcmp(mod_known[0].name, fullname) || flushmap->value)
{

View file

@ -335,7 +335,7 @@ R_BlendLightmaps(void)
/* try uploading the block now */
if (!LM_AllocBlock(smax, tmax, &surf->dlight_s, &surf->dlight_t))
{
ri.Sys_Error(ERR_FATAL,
VID_Error(ERR_FATAL,
"Consecutive calls to LM_AllocBlock(%d,%d) failed (dynamic)\n",
smax, tmax);
}

View file

@ -126,7 +126,7 @@ R_SubdividePolygon(int numverts, float *verts)
if (numverts > 60)
{
ri.Sys_Error(ERR_DROP, "numverts = %i", numverts);
VID_Error(ERR_DROP, "numverts = %i", numverts);
}
R_BoundPoly(numverts, verts, mins, maxs);
@ -454,7 +454,7 @@ R_ClipSkyPolygon(int nump, vec3_t vecs, int stage)
if (nump > MAX_CLIP_VERTS - 2)
{
ri.Sys_Error(ERR_DROP, "R_ClipSkyPolygon: MAX_CLIP_VERTS");
VID_Error(ERR_DROP, "R_ClipSkyPolygon: MAX_CLIP_VERTS");
}
if (stage == 6)