diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2001-01-04 15:31:38 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2001-01-04 15:31:38 +0000 |
commit | 63cca75e6333281d71e3a3b20496113f0e3ad455 (patch) | |
tree | 7e279e41c8554b3bf4859ec550cf0e5c30a8fd8e | |
parent | 1c768645c5449f3bb66edb198821cf4947998a68 (diff) |
minor bug fixes
-rw-r--r-- | src/mesa/swrast/s_pointtemp.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index ed2ab0ca5e..26b7da78ad 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -1,4 +1,4 @@ -/* $Id: s_pointtemp.h,v 1.1 2001/01/03 22:17:16 brianp Exp $ */ +/* $Id: s_pointtemp.h,v 1.2 2001/01/04 15:31:38 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -223,7 +223,9 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) const GLfloat dy = y - vert->win[1]; const GLfloat dist2 = dx * dx + dy * dy; if (dist2 < rmax2) { +#if FLAGS & RGBA alpha = vert->color[3]; +#endif if (dist2 >= rmin2) { GLint coverage = (GLint) (256.0F - (dist2 - rmin2) * cscale); #if FLAGS & RGBA @@ -231,7 +233,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) alpha = (alpha * coverage) >> 8; #else /* 4 fractional index bits */ - index = (index & ~f) | (coverage >> 4); /* XXX verify */ + index = (index & ~0xf) | (coverage >> 4); /* XXX verify */ #endif } #endif /* SMOOTH */ @@ -245,20 +247,23 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) red, green, blue, alpha, sRed, sGreen, sBlue, texcoord); - #elif FLAGS & TEXTURE if (swrast->_MultiTextureEnabled) { PB_WRITE_MULTITEX_PIXEL(PB, x, y, z, fog, red, green, blue, alpha, texcoord); } - else { + else if (ctx->Texture._ReallyEnabled) { PB_WRITE_TEX_PIXEL(PB, x,y,z, fog, red, green, blue, alpha, texcoord[0][0], texcoord[0][1], texcoord[0][2]); } + else { + PB_WRITE_RGBA_PIXEL(PB, x, y, z, fog, + red, green, blue, alpha); + } #elif FLAGS & RGBA PB_WRITE_RGBA_PIXEL(PB, x, y, z, fog, red, green, blue, alpha); #else /* color index */ |