s/BlendEquatioRGB/BlendEquationRGB/
[mesa.git] / src / mesa / swrast / s_pointtemp.h
index f21f4f634dcce62aaa2f3d3ca2e523db6c7d1416..0ca137cd02964395d1c8e160499b0dc82dc0c4a4 100644 (file)
@@ -1,9 +1,8 @@
-
 /*
  * Mesa 3-D graphics library
- * Version:  5.1
+ * Version:  6.0
  *
- * Copyright (C) 1999-2002  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"),
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+/*
+ * Regarding GL_NV_point_sprite:
+ *
+ * Portions of this software may use or implement intellectual
+ * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims
+ * any and all warranties with respect to such intellectual property,
+ * including any use thereof or modifications thereto.
+ */
+
 
 /*
  * Point rendering template code.
@@ -63,10 +71,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 +142,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;