summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_pointtemp.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-12-04 03:19:46 +0000
committerBrian Paul <[email protected]>2003-12-04 03:19:46 +0000
commitb305028464f02947c0cce0476af0e35f4ed1fafa (patch)
tree6623fb86dea2eb572743c161055e37a1d43c995d /src/mesa/swrast/s_pointtemp.h
parent03e29a5f77c13b7b888bd8443cb2752850e47d6a (diff)
Port over changes from XFree86/Mesa 5.0.2, mostly to silence compiler warnings.
Diffstat (limited to 'src/mesa/swrast/s_pointtemp.h')
-rw-r--r--src/mesa/swrast/s_pointtemp.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h
index f21f4f634dc..1ae1c946ff1 100644
--- a/src/mesa/swrast/s_pointtemp.h
+++ b/src/mesa/swrast/s_pointtemp.h
@@ -63,10 +63,10 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
#if FLAGS & (ATTENUATE | LARGE | SMOOTH | SPRITE)
GLfloat size;
#endif
-#if FLAGS & ATTENUATE
+#if FLAGS & RGBA
+#if (FLAGS & ATTENUATE) && (FLAGS & SMOOTH)
GLfloat alphaAtten;
#endif
-#if FLAGS & RGBA
const GLchan red = vert->color[0];
const GLchan green = vert->color[1];
const GLchan blue = vert->color[2];
@@ -134,12 +134,16 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
#if FLAGS & ATTENUATE
if (vert->pointSize >= ctx->Point.Threshold) {
size = MIN2(vert->pointSize, ctx->Point.MaxSize);
+#if (FLAGS & RGBA) && (FLAGS & SMOOTH)
alphaAtten = 1.0F;
+#endif
}
else {
+#if (FLAGS & RGBA) && (FLAGS & SMOOTH)
GLfloat dsize = vert->pointSize / ctx->Point.Threshold;
- size = MAX2(ctx->Point.Threshold, ctx->Point.MinSize);
alphaAtten = dsize * dsize;
+#endif
+ size = MAX2(ctx->Point.Threshold, ctx->Point.MinSize);
}
#elif FLAGS & (LARGE | SMOOTH | SPRITE)
size = ctx->Point._Size;