-void (GLAPIENTRY *qglVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr);
-void (GLAPIENTRY *qglColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr);
-void (GLAPIENTRY *qglTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr);
-void (GLAPIENTRY *qglArrayElement)(GLint i);
-void (GLAPIENTRY *qglDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
-void (GLAPIENTRY *qglMTexCoord2f)(GLenum, GLfloat, GLfloat);
-void (GLAPIENTRY *qglSelectTexture)(GLenum);
-
-void VID_CheckVertexArrays (void)
-{
- if (COM_CheckParm("-novertex"))
- {
- Con_Printf("...vertex array support disabled\n");
- return;
- }
- if ((qglArrayElement = (void *) wglGetProcAddress("glArrayElement"))
- && (qglColorPointer = (void *) wglGetProcAddress("glColorPointer"))
-// && (qglDrawArrays = (void *) wglGetProcAddress("glDrawArrays"))
- && (qglDrawElements = (void *) wglGetProcAddress("glDrawElements"))
-// && (qglInterleavedArrays = (void *) wglGetProcAddress("glInterleavedArrays"))
- && (qglTexCoordPointer = (void *) wglGetProcAddress("glTexCoordPointer"))
- && (qglVertexPointer = (void *) wglGetProcAddress("glVertexPointer"))
- )
- {
- Con_Printf("...vertex array support detected\n");
- gl_arrays = true;
- return;
- }
-
- Con_Printf("...vertex array support disabled (not detected - get a better driver)\n");
-}
-
-int texture_extension_number = 1;
-
-void VID_CheckMultiTexture(void)
-{
- qglMTexCoord2f = NULL;
- qglSelectTexture = NULL;
- // Check to see if multitexture is disabled
- if (COM_CheckParm("-nomtex"))
- {
- Con_Printf("...multitexture disabled\n");
- return;
- }
- // Test for ARB_multitexture
- if (!COM_CheckParm("-SGISmtex") && strstr(gl_extensions, "GL_ARB_multitexture "))
- {
- Con_Printf("...using GL_ARB_multitexture\n");
- qglMTexCoord2f = (void *) wglGetProcAddress("glMultiTexCoord2fARB");
- qglSelectTexture = (void *) wglGetProcAddress("glActiveTextureARB");
- gl_mtexable = true;
- gl_mtex_enum = GL_TEXTURE0_ARB;
- }
- else if (strstr(gl_extensions, "GL_SGIS_multitexture ")) // Test for SGIS_multitexture (if ARB_multitexture not found)
- {
- Con_Printf("...using GL_SGIS_multitexture\n");
- qglMTexCoord2f = (void *) wglGetProcAddress("glMTexCoord2fSGIS");
- qglSelectTexture = (void *) wglGetProcAddress("glSelectTextureSGIS");
- gl_mtexable = true;
- gl_mtex_enum = TEXTURE0_SGIS;
- }
- if (!gl_mtexable)
- Con_Printf("...multitexture disabled (not detected)\n");
-}
-