From 36815aea2d337f9c24517adfcebafb879a232dad Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 18 Dec 2010 21:58:45 +0000 Subject: [PATCH] r_showsurfaces: fix "ghost normals" git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10674 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=08fe8138a21ee02cecd4f4c92b889e88f1c50594 --- gl_rmain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index 62c530e1..8a10b290 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -14282,7 +14282,7 @@ void R_DrawDebugModel(void) if (r_shownormals.value < 0) { qglBegin(GL_LINES); - for (k = 0, l = surface->num_firstvertex;k < surface->num_vertices;k++, l++) + for (k = 0, l = rsurface.batchfirstvertex;k < rsurface.batchnumvertices;k++, l++) { VectorCopy(rsurface.batchvertex3f + l * 3, v); GL_Color(0, 0, r_refdef.view.colorscale, 1); @@ -14297,7 +14297,7 @@ void R_DrawDebugModel(void) if (r_shownormals.value > 0 && rsurface.batchsvector3f) { qglBegin(GL_LINES); - for (k = 0, l = surface->num_firstvertex;k < surface->num_vertices;k++, l++) + for (k = 0, l = rsurface.batchfirstvertex;k < rsurface.batchnumvertices;k++, l++) { VectorCopy(rsurface.batchvertex3f + l * 3, v); GL_Color(r_refdef.view.colorscale, 0, 0, 1); @@ -14309,7 +14309,7 @@ void R_DrawDebugModel(void) qglEnd(); CHECKGLERROR qglBegin(GL_LINES); - for (k = 0, l = surface->num_firstvertex;k < surface->num_vertices;k++, l++) + for (k = 0, l = rsurface.batchfirstvertex;k < rsurface.batchnumvertices;k++, l++) { VectorCopy(rsurface.batchvertex3f + l * 3, v); GL_Color(0, r_refdef.view.colorscale, 0, 1); @@ -14321,7 +14321,7 @@ void R_DrawDebugModel(void) qglEnd(); CHECKGLERROR qglBegin(GL_LINES); - for (k = 0, l = surface->num_firstvertex;k < surface->num_vertices;k++, l++) + for (k = 0, l = rsurface.batchfirstvertex;k < rsurface.batchnumvertices;k++, l++) { VectorCopy(rsurface.batchvertex3f + l * 3, v); GL_Color(0, 0, r_refdef.view.colorscale, 1); -- 2.39.2