summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_lines.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-04-24 16:40:54 -0600
committerBrian <[email protected]>2007-04-24 16:40:54 -0600
commit9ede048127ea71282fd97e01516dedcfb03e2a23 (patch)
tree0b9fc81555b47fcc31f9996ddf1e75bfb9acff5f /src/mesa/swrast/s_lines.c
parent97693436a5740fb56c29fcd1cb0a1aa562349902 (diff)
trim down the number of line drawing functions, special cases
Diffstat (limited to 'src/mesa/swrast/s_lines.c')
-rw-r--r--src/mesa/swrast/s_lines.c41
1 files changed, 5 insertions, 36 deletions
diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c
index 7b2a52b4ffa..80702e41a3c 100644
--- a/src/mesa/swrast/s_lines.c
+++ b/src/mesa/swrast/s_lines.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.3
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -171,34 +171,13 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
#include "s_linetemp.h"
-/* Single-texture line, w/ fog, Z, specular, etc. */
+/* General-purpose textured line (any/all features). */
#define NAME textured_line
#define INTERP_RGBA
-#define INTERP_Z
-#define INTERP_FOG
-#define INTERP_TEX
-#define RENDER_SPAN(span) \
- if (ctx->Line.StippleFlag) { \
- span.arrayMask |= SPAN_MASK; \
- compute_stipple_mask(ctx, span.end, span.array->mask); \
- } \
- if (ctx->Line._Width > 1.0) { \
- draw_wide_line(ctx, &span, (GLboolean)(dx > dy)); \
- } \
- else { \
- _swrast_write_rgba_span(ctx, &span); \
- }
-#include "s_linetemp.h"
-
-
-/* Multi-texture or separate specular line, w/ fog, Z, specular, etc. */
-#define NAME multitextured_line
-#define INTERP_RGBA
#define INTERP_SPEC
#define INTERP_Z
#define INTERP_FOG
-#define INTERP_MULTITEX
-#define INTERP_VARYING
+#define INTERP_ATTRIBS
#define RENDER_SPAN(span) \
if (ctx->Line.StippleFlag) { \
span.arrayMask |= SPAN_MASK; \
@@ -251,8 +230,6 @@ _mesa_print_line_function(GLcontext *ctx)
_mesa_printf("general_rgba_line\n");
else if (swrast->Line == textured_line)
_mesa_printf("textured_line\n");
- else if (swrast->Line == multitextured_line)
- _mesa_printf("multitextured_line\n");
else
_mesa_printf("Driver func %p\n", (void *(*)()) swrast->Line);
}
@@ -302,15 +279,7 @@ _swrast_choose_line( GLcontext *ctx )
else if (ctx->Texture._EnabledCoordUnits
|| ctx->FragmentProgram._Current) {
/* textured lines */
- if (ctx->Texture._EnabledCoordUnits > 0x1
- || NEED_SECONDARY_COLOR(ctx)
- || ctx->FragmentProgram._Current) {
- /* multi-texture and/or separate specular color */
- USE(multitextured_line);
- }
- else {
- USE(textured_line);
- }
+ USE(textured_line);
}
else if (ctx->Depth.Test || swrast->_FogEnabled || ctx->Line._Width != 1.0
|| ctx->Line.StippleFlag) {