Permalink
Browse files

edge scanning now uses counter-clockwise windings

  • Loading branch information...
1 parent d9af9f0 commit ec795f0b16d773bc5d08017f483f02b4479f8630 @fielder committed Feb 13, 2012
Showing with 8 additions and 6 deletions.
  1. +8 −6 rast.c
View
14 rast.c
@@ -48,8 +48,8 @@ FinishSpans (void)
while (i != p_bottomidx)
{
/* find next vert */
- if ((nexti = i + 1) == num_outverts)
- nexti = 0;
+ if ((nexti = i - 1) == -1)
+ nexti = num_outverts - 1;
nv = &p_outverts[nexti];
ibot = ceil(nv->v);
@@ -93,8 +93,8 @@ BeginSpans (void)
while (i != p_bottomidx)
{
/* find next vert */
- if ((nexti = i - 1) == -1)
- nexti = num_outverts - 1;
+ if ((nexti = i + 1) == num_outverts)
+ nexti = 0;
nv = &p_outverts[nexti];
ibot = ceil(nv->v);
@@ -350,8 +350,10 @@ R_DrawGeometry (void)
SetupFrustum ();
for (i = 0; i < g_numsurfs; i++)
- //DrawSurf (&g_surfs[i]);
- DrawSurfEdges (&g_surfs[i]);
+ {
+ DrawSurf (&g_surfs[i]);
+// DrawSurfEdges (&g_surfs[i]);
+ }
#if 1
{

0 comments on commit ec795f0

Please sign in to comment.