From: havoc Date: Thu, 27 Jun 2013 05:57:31 +0000 (+0000) Subject: remove cvar gl_mesh_prefer_short_elements because many draw calls do not X-Git-Tag: xonotic-v0.8.0~178 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3b36d778718ca15652081554c6945e7ad4f224ef;p=xonotic%2Fdarkplaces.git remove cvar gl_mesh_prefer_short_elements because many draw calls do not even provide an element3i to use git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11960 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=36dc9ea8b11d602992f66aeec3750b819dfdb43b --- diff --git a/gl_backend.c b/gl_backend.c index dc12b154..81e71c3b 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -100,7 +100,6 @@ extern D3DCAPS9 vid_d3d9caps; cvar_t gl_mesh_drawrangeelements = {0, "gl_mesh_drawrangeelements", "1", "use glDrawRangeElements function if available instead of glDrawElements (for performance comparisons or bug testing)"}; cvar_t gl_mesh_testmanualfeeding = {0, "gl_mesh_testmanualfeeding", "0", "use glBegin(GL_TRIANGLES);glTexCoord2f();glVertex3f();glEnd(); primitives instead of glDrawElements (useful to test for driver bugs with glDrawElements)"}; -cvar_t gl_mesh_prefer_short_elements = {CVAR_SAVE, "gl_mesh_prefer_short_elements", "1", "use GL_UNSIGNED_SHORT element arrays instead of GL_UNSIGNED_INT"}; cvar_t gl_paranoid = {0, "gl_paranoid", "0", "enables OpenGL error checking and other tests"}; cvar_t gl_printcheckerror = {0, "gl_printcheckerror", "0", "prints all OpenGL error checks, useful to identify location of driver crashes"}; @@ -609,7 +608,6 @@ void gl_backend_init(void) Cvar_RegisterVariable(&gl_mesh_drawrangeelements); Cvar_RegisterVariable(&gl_mesh_testmanualfeeding); - Cvar_RegisterVariable(&gl_mesh_prefer_short_elements); Cmd_AddCommand("gl_vbostats", GL_VBOStats_f, "prints a list of all buffer objects (vertex data and triangle elements) and total video memory used by them"); @@ -2752,14 +2750,6 @@ void R_Mesh_Draw(int firstvertex, int numvertices, int firsttriangle, int numtri Con_DPrintf("R_Mesh_Draw(%d, %d, %d, %d, %8p, %8p, %8x, %8p, %8p, %8x);\n", firstvertex, numvertices, firsttriangle, numtriangles, (void *)element3i, (void *)element3i_indexbuffer, (int)element3i_bufferoffset, (void *)element3s, (void *)element3s_indexbuffer, (int)element3s_bufferoffset); return; } - if (!gl_mesh_prefer_short_elements.integer) - { - if (element3i) - { - element3s = NULL; - element3s_indexbuffer = NULL; - } - } // adjust the pointers for firsttriangle if (element3i) element3i += firsttriangle * 3;