From: divverent Date: Sat, 18 Dec 2010 21:58:45 +0000 (+0000) Subject: r_showsurfaces: fix "ghost normals" X-Git-Tag: xonotic-v0.5.0~438^2~167 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=08fe8138a21ee02cecd4f4c92b889e88f1c50594;p=xonotic%2Fdarkplaces.git r_showsurfaces: fix "ghost normals" git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10674 d7cf8633-e32d-0410-b094-e92efae38249 --- 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);