]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix display of r_shownormals < 0
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 18 Dec 2010 11:12:36 +0000 (11:12 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 18 Dec 2010 12:49:15 +0000 (13:49 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10670 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=cce29d94f55810f8515b00b7012dc39bd384daad

gl_rmain.c

index f802e64a04a6ca4353f55abbb85b89209d72261d..6102c0e1ed63a2bf99cb4aeb08b0d8a49e2b8dd2 100644 (file)
@@ -14242,7 +14242,7 @@ void R_DrawDebugModel(void)
 
        GL_PolygonOffset(r_refdef.polygonfactor, r_refdef.polygonoffset);
 
-       if (r_showtris.integer || r_shownormals.integer)
+       if (r_showtris.integer || (r_shownormals.value != 0))
        {
                if (r_showdisabledepthtest.integer)
                {
@@ -14282,10 +14282,10 @@ void R_DrawDebugModel(void)
                                        for (k = 0, l = surface->num_firstvertex;k < surface->num_vertices;k++, l++)
                                        {
                                                VectorCopy(rsurface.batchvertex3f + l * 3, v);
-                                               GL_Color(r_refdef.view.colorscale, 0, 0, 1);
+                                               GL_Color(0, 0, r_refdef.view.colorscale, 1);
                                                qglVertex3f(v[0], v[1], v[2]);
-                                               VectorMA(v, -r_shownormals.value, rsurface.batchsvector3f + l * 3, v);
-                                               GL_Color(r_refdef.view.colorscale, 1, 1, 1);
+                                               VectorMA(v, -r_shownormals.value, rsurface.batchnormal3f + l * 3, v);
+                                               GL_Color(r_refdef.view.colorscale, r_refdef.view.colorscale, r_refdef.view.colorscale, 1);
                                                qglVertex3f(v[0], v[1], v[2]);
                                        }
                                        qglEnd();
@@ -14300,7 +14300,7 @@ void R_DrawDebugModel(void)
                                                GL_Color(r_refdef.view.colorscale, 0, 0, 1);
                                                qglVertex3f(v[0], v[1], v[2]);
                                                VectorMA(v, r_shownormals.value, rsurface.batchsvector3f + l * 3, v);
-                                               GL_Color(r_refdef.view.colorscale, 1, 1, 1);
+                                               GL_Color(r_refdef.view.colorscale, r_refdef.view.colorscale, r_refdef.view.colorscale, 1);
                                                qglVertex3f(v[0], v[1], v[2]);
                                        }
                                        qglEnd();
@@ -14312,7 +14312,7 @@ void R_DrawDebugModel(void)
                                                GL_Color(0, r_refdef.view.colorscale, 0, 1);
                                                qglVertex3f(v[0], v[1], v[2]);
                                                VectorMA(v, r_shownormals.value, rsurface.batchtvector3f + l * 3, v);
-                                               GL_Color(r_refdef.view.colorscale, 1, 1, 1);
+                                               GL_Color(r_refdef.view.colorscale, r_refdef.view.colorscale, r_refdef.view.colorscale, 1);
                                                qglVertex3f(v[0], v[1], v[2]);
                                        }
                                        qglEnd();
@@ -14324,7 +14324,7 @@ void R_DrawDebugModel(void)
                                                GL_Color(0, 0, r_refdef.view.colorscale, 1);
                                                qglVertex3f(v[0], v[1], v[2]);
                                                VectorMA(v, r_shownormals.value, rsurface.batchnormal3f + l * 3, v);
-                                               GL_Color(r_refdef.view.colorscale, 1, 1, 1);
+                                               GL_Color(r_refdef.view.colorscale, r_refdef.view.colorscale, r_refdef.view.colorscale, 1);
                                                qglVertex3f(v[0], v[1], v[2]);
                                        }
                                        qglEnd();