summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_aaline.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-02-24 15:39:08 -0800
committerIan Romanick <[email protected]>2010-03-03 12:37:03 -0800
commite5ed4c45c675ebdd595ad0d31f2835f8b2b8dc57 (patch)
treeeb36107f2036c2a4c99bbd425281892904c3eec4 /src/mesa/swrast/s_aaline.c
parent87b9f5a7251b96bd315a72ae6fd972aa94e226e0 (diff)
swrast: Remove support for rendering antialiased lines into a color-index buffer
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_aaline.c')
-rw-r--r--src/mesa/swrast/s_aaline.c50
1 files changed, 9 insertions, 41 deletions
diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c
index 9bfa8f2e619..6ba4604e690 100644
--- a/src/mesa/swrast/s_aaline.c
+++ b/src/mesa/swrast/s_aaline.c
@@ -59,10 +59,8 @@ struct LineInfo
/* DO_Z */
GLfloat zPlane[4];
- /* DO_RGBA */
+ /* DO_RGBA - always enabled */
GLfloat rPlane[4], gPlane[4], bPlane[4], aPlane[4];
- /* DO_INDEX */
- GLfloat iPlane[4];
/* DO_ATTRIBS */
GLfloat wPlane[4];
GLfloat attrPlane[FRAG_ATTRIB_MAX][4][4];
@@ -325,20 +323,6 @@ compute_coveragef(const struct LineInfo *info,
}
-/**
- * Compute coverage value for color index mode.
- * XXX this may not be quite correct.
- * \return coverage in [0,15].
- */
-static GLfloat
-compute_coveragei(const struct LineInfo *info,
- GLint winx, GLint winy)
-{
- return compute_coveragef(info, winx, winy) * 15.0F;
-}
-
-
-
typedef void (*plot_func)(GLcontext *ctx, struct LineInfo *line,
int ix, int iy);
@@ -475,22 +459,13 @@ segment(GLcontext *ctx,
}
-#define NAME(x) aa_ci_##x
-#define DO_Z
-#define DO_ATTRIBS /* for fog */
-#define DO_INDEX
-#include "s_aalinetemp.h"
-
-
#define NAME(x) aa_rgba_##x
#define DO_Z
-#define DO_RGBA
#include "s_aalinetemp.h"
#define NAME(x) aa_general_rgba_##x
#define DO_Z
-#define DO_RGBA
#define DO_ATTRIBS
#include "s_aalinetemp.h"
@@ -503,22 +478,15 @@ _swrast_choose_aa_line_function(GLcontext *ctx)
ASSERT(ctx->Line.SmoothFlag);
- if (ctx->Visual.rgbMode) {
- /* RGBA */
- if (ctx->Texture._EnabledCoordUnits != 0
- || ctx->FragmentProgram._Current
- || (ctx->Light.Enabled &&
- ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
- || ctx->Fog.ColorSumEnabled
- || swrast->_FogEnabled) {
- swrast->Line = aa_general_rgba_line;
- }
- else {
- swrast->Line = aa_rgba_line;
- }
+ if (ctx->Texture._EnabledCoordUnits != 0
+ || ctx->FragmentProgram._Current
+ || (ctx->Light.Enabled &&
+ ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
+ || ctx->Fog.ColorSumEnabled
+ || swrast->_FogEnabled) {
+ swrast->Line = aa_general_rgba_line;
}
else {
- /* Color Index */
- swrast->Line = aa_ci_line;
+ swrast->Line = aa_rgba_line;
}
}