X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=vid_3dfxsvga.c;h=601387c1625991613ae96b094b9453ed708afcbf;hp=f326228bb8647de4b940833c9d59149ef7daacc0;hb=e4b3858e7aca0ead91be1d8f675db084d025abad;hpb=b062ccd558c25bab3c796f732c7798684537679b diff --git a/vid_3dfxsvga.c b/vid_3dfxsvga.c index f326228b..601387c1 100644 --- a/vid_3dfxsvga.c +++ b/vid_3dfxsvga.c @@ -46,9 +46,6 @@ #include -unsigned d_8to24table[256]; -unsigned char d_15to8table[65536]; - cvar_t vid_mode = {"vid_mode","0",false}; viddef_t vid; // global video state @@ -62,8 +59,6 @@ int VID_options_items = 0; /*-----------------------------------------------------------------------*/ -int texture_extension_number = 1; - float gldepthmin, gldepthmax; const char *gl_vendor; @@ -71,17 +66,6 @@ const char *gl_renderer; const char *gl_version; const char *gl_extensions; -void (*qglMTexCoord2f) (GLenum, GLfloat, GLfloat); -void (*qglSelectTexture) (GLenum); - -int gl_mtex_enum = 0; - -// LordHavoc: in GLX these are never set, simply provided to make the rest of the code work -qboolean isG200 = false; -qboolean isRagePro = false; -qboolean gl_mtexable = false; -qboolean gl_arrays = false; - /*-----------------------------------------------------------------------*/ void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height) { @@ -122,11 +106,6 @@ void InitSig(void) signal(SIGTERM, signal_handler); } -// LordHavoc: FIXME or something? -void VID_CheckVertexArrays() -{ -} - /* VID_CheckMultitexture @@ -165,7 +144,34 @@ void VID_CheckMultitexture() else Con_Printf ("none found\n"); dlclose(dlhand); - dlhand = NULL; + dlhand = NULL; +} + +void VID_CheckCVA(void) +{ + qglLockArraysEXT = NULL; + qglUnlockArraysEXT = NULL; + gl_supportslockarrays = false; + if (COM_CheckParm("-nocva")) + { + Con_Printf("...compiled vertex arrays disabled\n"); + return; + } + dlhand = dlopen (NULL, RTLD_LAZY); + if (dlhand == NULL) + { + Con_Printf("Unable to open symbol list for main program.\n"); + return; + } + if (strstr(gl_extensions, "GL_EXT_compiled_vertex_array")) + { + Con_Printf("...using compiled vertex arrays\n"); + qglLockArraysEXT = (void *) dlsym(dlhand, "glLockArraysEXT"); + qglUnlockArraysEXT = (void *) dlsym(dlhand, "glUnlockArraysEXT"); + gl_supportslockarrays = true; + } + dlclose(dlhand); + dlhand = NULL; }