use clamped Line._Width in calculations
authorKeith Whitwell <keith@tungstengraphics.com>
Wed, 29 Dec 2004 14:36:58 +0000 (14:36 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Wed, 29 Dec 2004 14:36:58 +0000 (14:36 +0000)
src/mesa/swrast/s_aalinetemp.h
src/mesa/swrast/s_lines.c

index 4ffa5b81fbbcb7619fa65a125505ec6178266a43..aa78ef7b596471f2b777f873fc0daccb32b56156 100644 (file)
@@ -149,7 +149,7 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
    line.dx = line.x1 - line.x0;
    line.dy = line.y1 - line.y0;
    line.len = SQRTF(line.dx * line.dx + line.dy * line.dy);
-   line.halfWidth = 0.5F * ctx->Line.Width;
+   line.halfWidth = 0.5F * ctx->Line._Width;
 
    if (line.len == 0.0 || IS_INF_OR_NAN(line.len))
       return;
index 20d32b25a0c534b575e4e0da125519b0336101b9..56179bcc05a79ee27a6034839ec7038ddc17f2e0 100644 (file)
@@ -68,7 +68,7 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor )
 
    ASSERT(span->end < MAX_WIDTH);
 
-   width = (GLint) CLAMP( ctx->Line.Width, MIN_LINE_WIDTH, MAX_LINE_WIDTH );
+   width = (GLint) CLAMP( ctx->Line._Width, MIN_LINE_WIDTH, MAX_LINE_WIDTH );
 
    if (width & 1)
       start = width / 2;
@@ -144,7 +144,7 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor )
       span.arrayMask |= SPAN_MASK;                             \
       compute_stipple_mask(ctx, span.end, span.array->mask);    \
    }                                                           \
-   if (ctx->Line.Width > 1.0) {                                        \
+   if (ctx->Line._Width > 1.0) {                                       \
       draw_wide_line(ctx, &span, (GLboolean)(dx > dy));                \
    }                                                           \
    else {                                                      \
@@ -163,7 +163,7 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor )
       span.arrayMask |= SPAN_MASK;                             \
       compute_stipple_mask(ctx, span.end, span.array->mask);   \
    }                                                           \
-   if (ctx->Line.Width > 1.0) {                                        \
+   if (ctx->Line._Width > 1.0) {                                       \
       draw_wide_line(ctx, &span, (GLboolean)(dx > dy));                \
    }                                                           \
    else {                                                      \
@@ -183,7 +183,7 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor )
       span.arrayMask |= SPAN_MASK;                             \
       compute_stipple_mask(ctx, span.end, span.array->mask);   \
    }                                                           \
-   if (ctx->Line.Width > 1.0) {                                        \
+   if (ctx->Line._Width > 1.0) {                                       \
       draw_wide_line(ctx, &span, (GLboolean)(dx > dy));                \
    }                                                           \
    else {                                                      \
@@ -204,7 +204,7 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor )
       span.arrayMask |= SPAN_MASK;                             \
       compute_stipple_mask(ctx, span.end, span.array->mask);   \
    }                                                           \
-   if (ctx->Line.Width > 1.0) {                                        \
+   if (ctx->Line._Width > 1.0) {                                       \
       draw_wide_line(ctx, &span, (GLboolean)(dx > dy));                \
    }                                                           \
    else {                                                      \
@@ -310,7 +310,7 @@ _swrast_choose_line( GLcontext *ctx )
             USE(textured_line);
          }
       }
-      else if (ctx->Depth.Test || ctx->Fog.Enabled || ctx->Line.Width != 1.0
+      else if (ctx->Depth.Test || ctx->Fog.Enabled || ctx->Line._Width != 1.0
                || ctx->Line.StippleFlag) {
          /* no texture, but Z, fog, width>1, stipple, etc. */
          if (rgbmode)