]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
r_showsurfaces: fix "ghost normals" xonotic-v0.1.0preview
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 18 Dec 2010 21:58:45 +0000 (21:58 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 18 Dec 2010 22:07:42 +0000 (23:07 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10674 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=08fe8138a21ee02cecd4f4c92b889e88f1c50594

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);