]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
made r_shownormals value control the length of the vectors shown, rather
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 8 Dec 2007 07:32:19 +0000 (07:32 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 8 Dec 2007 07:32:19 +0000 (07:32 +0000)
than opacity, this also reduces the length by 8x compared to the
previous code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7778 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index b453e2594bd58192ac5d0370d6608d39240cf343..f75c34b6eea62dffad9f170201cb25eec8fb09d7 100644 (file)
@@ -6211,13 +6211,13 @@ void R_DrawDebugModel(entity_render_t *ent)
                                }
                                if (r_shownormals.value > 0)
                                {
-                                       GL_Color(r_view.colorscale, 0, 0, r_shownormals.value);
+                                       GL_Color(r_view.colorscale, 0, 0, 1);
                                        qglBegin(GL_LINES);
                                        for (k = 0, l = surface->num_firstvertex;k < surface->num_vertices;k++, l++)
                                        {
                                                VectorCopy(rsurface.vertex3f + l * 3, v);
                                                qglVertex3f(v[0], v[1], v[2]);
-                                               VectorMA(v, 8, rsurface.svector3f + l * 3, v);
+                                               VectorMA(v, r_shownormals.value, rsurface.svector3f + l * 3, v);
                                                qglVertex3f(v[0], v[1], v[2]);
                                        }
                                        qglEnd();
@@ -6228,7 +6228,7 @@ void R_DrawDebugModel(entity_render_t *ent)
                                        {
                                                VectorCopy(rsurface.vertex3f + l * 3, v);
                                                qglVertex3f(v[0], v[1], v[2]);
-                                               VectorMA(v, 8, rsurface.tvector3f + l * 3, v);
+                                               VectorMA(v, r_shownormals.value, rsurface.tvector3f + l * 3, v);
                                                qglVertex3f(v[0], v[1], v[2]);
                                        }
                                        qglEnd();
@@ -6239,7 +6239,7 @@ void R_DrawDebugModel(entity_render_t *ent)
                                        {
                                                VectorCopy(rsurface.vertex3f + l * 3, v);
                                                qglVertex3f(v[0], v[1], v[2]);
-                                               VectorMA(v, 8, rsurface.normal3f + l * 3, v);
+                                               VectorMA(v, r_shownormals.value, rsurface.normal3f + l * 3, v);
                                                qglVertex3f(v[0], v[1], v[2]);
                                        }
                                        qglEnd();