diff --git a/src/client/refresh/header/local.h b/src/client/refresh/header/local.h index 03929e6e..93fe6a4e 100644 --- a/src/client/refresh/header/local.h +++ b/src/client/refresh/header/local.h @@ -213,11 +213,9 @@ extern cvar_t *gl_overbrightbits; extern cvar_t *gl_vertex_arrays; -extern cvar_t *gl_ext_swapinterval; extern cvar_t *gl_palettedtexture; extern cvar_t *gl_multitexture; extern cvar_t *gl_pointparameters; -extern cvar_t *gl_ext_compiled_vertex_array; extern cvar_t *gl_mtexcombine; extern cvar_t *gl_particle_min_size; @@ -227,10 +225,7 @@ extern cvar_t *gl_particle_att_a; extern cvar_t *gl_particle_att_b; extern cvar_t *gl_particle_att_c; -extern cvar_t *gl_nosubimage; -extern cvar_t *gl_bitdepth; extern cvar_t *gl_mode; - extern cvar_t *gl_customwidth; extern cvar_t *gl_customheight; @@ -243,25 +238,18 @@ extern cvar_t *gl_dynamic; extern cvar_t *gl_nobind; extern cvar_t *gl_round_down; extern cvar_t *gl_picmip; -extern cvar_t *gl_skymip; extern cvar_t *gl_showtris; extern cvar_t *gl_finish; extern cvar_t *gl_ztrick; extern cvar_t *gl_zfix; extern cvar_t *gl_clear; extern cvar_t *gl_cull; -extern cvar_t *gl_poly; -extern cvar_t *gl_texsort; extern cvar_t *gl_polyblend; extern cvar_t *gl_flashblend; -extern cvar_t *gl_lightmaptype; extern cvar_t *gl_modulate; -extern cvar_t *gl_playermip; extern cvar_t *gl_drawbuffer; -extern cvar_t *gl_3dlabs_broken; extern cvar_t *gl_swapinterval; extern cvar_t *gl_anisotropic; -extern cvar_t *gl_anisotropic_avail; extern cvar_t *gl_texturemode; extern cvar_t *gl_texturealphamode; extern cvar_t *gl_texturesolidmode; @@ -274,7 +262,6 @@ extern cvar_t *vid_gamma; extern cvar_t *intensity; -extern int gl_lightmap_format; extern int gl_solid_format; extern int gl_alpha_format; extern int gl_tex_solid_format; diff --git a/src/client/refresh/r_main.c b/src/client/refresh/r_main.c index 52819d93..a5bc69f5 100644 --- a/src/client/refresh/r_main.c +++ b/src/client/refresh/r_main.c @@ -83,11 +83,6 @@ cvar_t *gl_farsee; cvar_t *gl_lightlevel; cvar_t *gl_overbrightbits; -cvar_t *gl_nosubimage; -cvar_t *gl_allow_software; - -cvar_t *gl_vertex_arrays; - cvar_t *gl_particle_min_size; cvar_t *gl_particle_max_size; cvar_t *gl_particle_size; @@ -95,14 +90,11 @@ cvar_t *gl_particle_att_a; cvar_t *gl_particle_att_b; cvar_t *gl_particle_att_c; -cvar_t *gl_ext_swapinterval; cvar_t *gl_palettedtexture; cvar_t *gl_multitexture; cvar_t *gl_pointparameters; -cvar_t *gl_ext_compiled_vertex_array; cvar_t *gl_mtexcombine; -cvar_t *gl_bitdepth; cvar_t *gl_drawbuffer; cvar_t *gl_lightmap; cvar_t *gl_shadows; @@ -119,7 +111,6 @@ cvar_t *gl_modulate; cvar_t *gl_nobind; cvar_t *gl_round_down; cvar_t *gl_picmip; -cvar_t *gl_skymip; cvar_t *gl_showtris; cvar_t *gl_ztrick; cvar_t *gl_zfix; @@ -128,14 +119,12 @@ cvar_t *gl_clear; cvar_t *gl_cull; cvar_t *gl_polyblend; cvar_t *gl_flashblend; -cvar_t *gl_playermip; cvar_t *gl_saturatelighting; cvar_t *gl_swapinterval; cvar_t *gl_texturemode; cvar_t *gl_texturealphamode; cvar_t *gl_texturesolidmode; cvar_t *gl_anisotropic; -cvar_t *gl_anisotropic_avail; cvar_t *gl_lockpvs; cvar_t *gl_msaa_samples; @@ -1216,9 +1205,6 @@ R_Register(void) gl_lightlevel = Cvar_Get("gl_lightlevel", "0", 0); gl_overbrightbits = Cvar_Get("gl_overbrightbits", "2", CVAR_ARCHIVE); - gl_nosubimage = Cvar_Get("gl_nosubimage", "0", 0); - gl_allow_software = Cvar_Get("gl_allow_software", "0", 0); - 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); @@ -1227,7 +1213,6 @@ R_Register(void) gl_particle_att_c = Cvar_Get("gl_particle_att_c", "0.01", CVAR_ARCHIVE); gl_modulate = Cvar_Get("gl_modulate", "1", CVAR_ARCHIVE); - 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); @@ -1236,7 +1221,6 @@ R_Register(void) 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); @@ -1245,21 +1229,16 @@ R_Register(void) 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_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 = Cvar_Get("gl_vertex_arrays", "0", CVAR_ARCHIVE); - gl_ext_swapinterval = Cvar_Get("gl_ext_swapinterval", "1", CVAR_ARCHIVE); gl_palettedtexture = Cvar_Get("gl_palettedtexture", "0", CVAR_ARCHIVE); gl_multitexture = Cvar_Get("gl_multitexture", "0", CVAR_ARCHIVE); gl_pointparameters = Cvar_Get("gl_pointparameters", "1", CVAR_ARCHIVE); - gl_ext_compiled_vertex_array = Cvar_Get("gl_ext_compiled_vertex_array", "1", CVAR_ARCHIVE); gl_mtexcombine = Cvar_Get("gl_mtexcombine", "1", CVAR_ARCHIVE); gl_drawbuffer = Cvar_Get("gl_drawbuffer", "GL_BACK", 0); @@ -1426,7 +1405,7 @@ R_Init(void *hinstance, void *hWnd) if (gl_config.minor_version < 4) { QGL_Shutdown(); - VID_Printf(PRINT_ALL, "Support for OpenGL 1.4 wasn't found\n"); + VID_Printf(PRINT_ALL, "Support for OpenGL 1.4 is not available\n"); return -1; } diff --git a/src/client/refresh/r_mesh.c b/src/client/refresh/r_mesh.c index 2f7d0c22..fa53089f 100644 --- a/src/client/refresh/r_mesh.c +++ b/src/client/refresh/r_mesh.c @@ -155,101 +155,6 @@ R_DrawAliasFrameLerp(dmdl_t *paliashdr, float backlerp) R_LerpVerts(paliashdr->num_xyz, v, ov, verts, lerp, move, frontv, backv); - if (gl_vertex_arrays->value) - { - float colorArray[MAX_VERTS * 4]; - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, 16, s_lerped); - - if (currententity->flags & - (RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE | - RF_SHELL_DOUBLE | RF_SHELL_HALF_DAM)) - { - glColor4f(shadelight[0], shadelight[1], shadelight[2], alpha); - } - else - { - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(3, GL_FLOAT, 0, colorArray); - - /* pre light everything */ - for (i = 0; i < paliashdr->num_xyz; i++) - { - float l = shadedots[verts[i].lightnormalindex]; - - colorArray[i * 3 + 0] = l * shadelight[0]; - colorArray[i * 3 + 1] = l * shadelight[1]; - colorArray[i * 3 + 2] = l * shadelight[2]; - } - } - - while (1) - { - /* get the vertex count and primitive type */ - count = *order++; - - if (!count) - { - break; /* done */ - } - - if (count < 0) - { - count = -count; - - type = GL_TRIANGLE_FAN; - } - else - { - type = GL_TRIANGLE_STRIP; - } - - total = count; - GLfloat vtx[3*total]; - GLfloat tex[2*total]; - unsigned int index_vtx = 0; - unsigned int index_tex = 0; - - if (currententity->flags & - (RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE | - RF_SHELL_DOUBLE | - RF_SHELL_HALF_DAM)) - { - do - { - index_xyz = order[2]; - order += 3; - - vtx[index_vtx++] = s_lerped [ index_xyz ][0]; - vtx[index_vtx++] = s_lerped [ index_xyz ][1]; - vtx[index_vtx++] = s_lerped [ index_xyz ][2]; - } - while (--count); - } - else - { - do - { - tex[index_tex++] = ( (float *) order ) [ 0 ]; - tex[index_tex++] = ( (float *) order ) [ 1 ]; - index_xyz = order [ 2 ]; - - order += 3; - } - while (--count); - } - - glEnableClientState( GL_VERTEX_ARRAY ); - - glVertexPointer( 3, GL_FLOAT, 0, vtx ); - glDrawArrays( type, 0, total ); - - glDisableClientState( GL_VERTEX_ARRAY ); - } - } - else - { while (1) { /* get the vertex count and primitive type */ @@ -274,7 +179,7 @@ R_DrawAliasFrameLerp(dmdl_t *paliashdr, float backlerp) total = count; GLfloat vtx[3*total]; GLfloat tex[2*total]; - GLfloat clr[4*total]; + GLfloat clr[4 * total]; unsigned int index_vtx = 0; unsigned int index_tex = 0; unsigned int index_clr = 0; @@ -287,14 +192,14 @@ R_DrawAliasFrameLerp(dmdl_t *paliashdr, float backlerp) index_xyz = order[2]; order += 3; - clr[index_clr++] = shadelight [ 0 ]; - clr[index_clr++] = shadelight [ 1 ]; - clr[index_clr++] = shadelight [ 2 ]; - clr[index_clr++] = alpha; + clr[index_clr++] = shadelight[0]; + clr[index_clr++] = shadelight[1]; + clr[index_clr++] = shadelight[2]; + clr[index_clr++] = alpha; - vtx[index_vtx++] = s_lerped [ index_xyz ][ 0 ]; - vtx[index_vtx++] = s_lerped [ index_xyz ][ 1 ]; - vtx[index_vtx++] = s_lerped [ index_xyz ][ 2 ]; + vtx[index_vtx++] = s_lerped[index_xyz][0]; + vtx[index_vtx++] = s_lerped[index_xyz][1]; + vtx[index_vtx++] = s_lerped[index_xyz][2]; } while (--count); } @@ -303,8 +208,8 @@ R_DrawAliasFrameLerp(dmdl_t *paliashdr, float backlerp) do { /* texture coordinates come from the draw list */ - tex[index_tex++] = ( (float *) order ) [ 0 ]; - tex[index_tex++] = ( (float *) order ) [ 1 ]; + tex[index_tex++] = ((float *) order)[0]; + tex[index_tex++] = ((float *) order)[1]; index_xyz = order[2]; order += 3; @@ -312,32 +217,31 @@ R_DrawAliasFrameLerp(dmdl_t *paliashdr, float backlerp) /* normals and vertexes come from the frame list */ l = shadedots[verts[index_xyz].lightnormalindex]; - clr[index_clr++] = l * shadelight [ 0 ]; - clr[index_clr++] = l * shadelight [ 1 ]; - clr[index_clr++] = l * shadelight [ 2 ]; - clr[index_clr++] = alpha; + clr[index_clr++] = l * shadelight[0]; + clr[index_clr++] = l * shadelight[1]; + clr[index_clr++] = l * shadelight[2]; + clr[index_clr++] = alpha; - vtx[index_vtx++] = s_lerped [ index_xyz ][ 0 ]; - vtx[index_vtx++] = s_lerped [ index_xyz ][ 1 ]; - vtx[index_vtx++] = s_lerped [ index_xyz ][ 2 ]; + vtx[index_vtx++] = s_lerped[index_xyz][0]; + vtx[index_vtx++] = s_lerped[index_xyz][1]; + vtx[index_vtx++] = s_lerped[index_xyz][2]; } while (--count); } - glEnableClientState( GL_VERTEX_ARRAY ); - glEnableClientState( GL_TEXTURE_COORD_ARRAY ); - glEnableClientState( GL_COLOR_ARRAY ); + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glEnableClientState(GL_COLOR_ARRAY); - glVertexPointer( 3, GL_FLOAT, 0, vtx ); - glTexCoordPointer( 2, GL_FLOAT, 0, tex ); - glColorPointer( 4, GL_FLOAT, 0, clr ); - glDrawArrays( type, 0, total ); + glVertexPointer(3, GL_FLOAT, 0, vtx); + glTexCoordPointer(2, GL_FLOAT, 0, tex); + glColorPointer(4, GL_FLOAT, 0, clr); + glDrawArrays(type, 0, total); - glDisableClientState( GL_VERTEX_ARRAY ); - glDisableClientState( GL_TEXTURE_COORD_ARRAY ); - glDisableClientState( GL_COLOR_ARRAY ); + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); } - } if (currententity->flags & (RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE |