From 38596acc4c07eeb74a2d407da0f570ba4f17e565 Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 18 Dec 2010 11:12:36 +0000 Subject: [PATCH] fix display of r_shownormals < 0 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10670 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=cce29d94f55810f8515b00b7012dc39bd384daad --- gl_rmain.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index f802e64a..6102c0e1 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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(); -- 2.39.2