From 8415edd035cb8b53ea90cdd7626799975ff5362b Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 18 Jan 2011 17:29:54 +0000 Subject: [PATCH] fix a major performance issue with the GL11/GL13 path for rtlights where it did not request BATCHNEED_NOGAPS and thus processed a huge number of unnecessary vertices git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10709 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=306d489af60e5192282cff848d2dcc5de6ef4d6c --- r_shadow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r_shadow.c b/r_shadow.c index 9b3d5c57..c2727329 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -2608,7 +2608,7 @@ static void R_Shadow_RenderLighting_Light_Vertex(int texturenumsurfaces, const m diffusecolorpants[0] = diffusecolorbase[0] * surfacepants[0];diffusecolorpants[1] = diffusecolorbase[1] * surfacepants[1];diffusecolorpants[2] = diffusecolorbase[2] * surfacepants[2]; ambientcolorshirt[0] = ambientcolorbase[0] * surfaceshirt[0];ambientcolorshirt[1] = ambientcolorbase[1] * surfaceshirt[1];ambientcolorshirt[2] = ambientcolorbase[2] * surfaceshirt[2]; diffusecolorshirt[0] = diffusecolorbase[0] * surfaceshirt[0];diffusecolorshirt[1] = diffusecolorbase[1] * surfaceshirt[1];diffusecolorshirt[2] = diffusecolorbase[2] * surfaceshirt[2]; - RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | (diffusescale > 0 ? BATCHNEED_ARRAY_NORMAL : 0) | BATCHNEED_ARRAY_TEXCOORD, texturenumsurfaces, texturesurfacelist); + RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | (diffusescale > 0 ? BATCHNEED_ARRAY_NORMAL : 0) | BATCHNEED_ARRAY_TEXCOORD | BATCHNEED_NOGAPS, texturenumsurfaces, texturesurfacelist); R_Mesh_VertexPointer(3, GL_FLOAT, sizeof(float[3]), rsurface.batchvertex3f, rsurface.batchvertex3f_vertexbuffer, rsurface.batchvertex3f_bufferoffset); R_Mesh_ColorPointer(4, GL_FLOAT, sizeof(float[4]), rsurface.array_passcolor4f, 0, 0); R_Mesh_TexCoordPointer(0, 2, GL_FLOAT, sizeof(float[2]), rsurface.batchtexcoordtexture2f, rsurface.batchtexcoordtexture2f_vertexbuffer, rsurface.batchtexcoordtexture2f_bufferoffset); -- 2.39.2