From 1e4731f6443a6efdfc4e425977490ddd5387caa3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 9 Mar 2004 16:58:26 +0000 Subject: Fix color index mode rendering. Changed SWvertex's index field to GLfloat and fix a few other bits. --- src/mesa/swrast/s_aalinetemp.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/mesa/swrast/s_aalinetemp.h') diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index 3a68e528a7..e6ac69d186 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -1,9 +1,8 @@ - /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.1 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 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"), @@ -37,7 +36,11 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) { const GLfloat fx = (GLfloat) ix; const GLfloat fy = (GLfloat) iy; +#ifdef DO_INDEX + const GLfloat coverage = compute_coveragei(line, ix, iy); +#else const GLfloat coverage = compute_coveragef(line, ix, iy); +#endif const GLuint i = line->span.end; if (coverage == 0.0) @@ -191,10 +194,10 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) line.span.arrayMask |= SPAN_INDEX; if (ctx->Light.ShadeModel == GL_SMOOTH) { compute_plane(line.x0, line.y0, line.x1, line.y1, - (GLfloat) v0->index, (GLfloat) v1->index, line.iPlane); + v0->index, v1->index, line.iPlane); } else { - constant_plane((GLfloat) v1->index, line.iPlane); + constant_plane(v1->index, line.iPlane); } #endif #ifdef DO_TEX -- cgit v1.2.3