From c8a2e03b26788ba4d0fccc7c7795b0320dd791c5 Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 4 Apr 2005 18:46:20 +0000 Subject: [PATCH 1/1] fix gl_combine 0 crashes (it was indexing the color vector as if it was a vertex property... wrong!) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5154 d7cf8633-e32d-0410-b094-e92efae38249 --- r_shadow.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/r_shadow.c b/r_shadow.c index f5cbf9fa..534243ac 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -2391,9 +2391,9 @@ void R_Shadow_RenderLighting(int firstvertex, int numvertices, int numtriangles, if (r_textureunits.integer >= 3) GL_Color(color[0], color[1], color[2], 1); else if (r_textureunits.integer >= 2) - R_Shadow_VertexNoShadingWithZAttenuation(numvertices, vertex3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight); + R_Shadow_VertexNoShadingWithZAttenuation(numvertices, vertex3f + 3 * firstvertex, color, matrix_modeltolight); else - R_Shadow_VertexNoShadingWithXYZAttenuation(numvertices, vertex3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight); + R_Shadow_VertexNoShadingWithXYZAttenuation(numvertices, vertex3f + 3 * firstvertex, color, matrix_modeltolight); GL_LockArrays(firstvertex, numvertices); R_Mesh_Draw(firstvertex, numvertices, numtriangles, elements); GL_LockArrays(0, 0); @@ -2441,11 +2441,11 @@ void R_Shadow_RenderLighting(int firstvertex, int numvertices, int numtriangles, color[1] = bound(0, color2[1], 1); color[2] = bound(0, color2[2], 1); if (r_textureunits.integer >= 3) - R_Shadow_VertexShading(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight); + R_Shadow_VertexShading(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color, matrix_modeltolight); else if (r_textureunits.integer >= 2) - R_Shadow_VertexShadingWithZAttenuation(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight); + R_Shadow_VertexShadingWithZAttenuation(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color, matrix_modeltolight); else - R_Shadow_VertexShadingWithXYZAttenuation(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight); + R_Shadow_VertexShadingWithXYZAttenuation(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color, matrix_modeltolight); GL_LockArrays(firstvertex, numvertices); R_Mesh_Draw(firstvertex, numvertices, numtriangles, elements); GL_LockArrays(0, 0); -- 2.39.2