]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
r_showsurfaces: fix "ghost normals"
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 18 Dec 2010 21:58:45 +0000 (21:58 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 18 Dec 2010 21:58:45 +0000 (21:58 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10674 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 62c530e108ac33da74afcc9e2867db15dc0d711f..8a10b29061119dcb2a6e5501ce6603f05422c087 100644 (file)
@@ -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);