summaryrefslogtreecommitdiff
path: root/src/mesa/main/points.c
diff options
context:
space:
mode:
authorJouk <joukj@tarantella.nano.tudelft.nl>2007-10-02 15:17:23 +0200
committerJouk <joukj@tarantella.nano.tudelft.nl>2007-10-02 15:17:23 +0200
commit584b84256b07e106cd7295495355eb21226465d7 (patch)
tree028d47d265d01f3f96787792fbd41d495d60856c /src/mesa/main/points.c
parenteb9a5b6d5127858b01ec12672c999e7d25cd7aed (diff)
parentde1d725f442caa4d8ecbac3256b5a33d1f4a1257 (diff)
Merge branch 'master' of git+ssh://joukj@git.freedesktop.org/git/mesa/mesa
Diffstat (limited to 'src/mesa/main/points.c')
-rw-r--r--src/mesa/main/points.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index e83db5de78..1458c90ab9 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -5,7 +5,7 @@
/*
* Mesa 3-D graphics library
- * Version: 7.0
+ * Version: 7.1
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -82,8 +82,13 @@ _mesa_PointParameteriNV( GLenum pname, GLint param )
void GLAPIENTRY
_mesa_PointParameterivNV( GLenum pname, const GLint *params )
{
- const GLfloat value = (GLfloat) params[0];
- _mesa_PointParameterfvEXT(pname, &value);
+ GLfloat p[3];
+ p[0] = (GLfloat) params[0];
+ if (pname == GL_DISTANCE_ATTENUATION_EXT) {
+ p[1] = (GLfloat) params[1];
+ p[2] = (GLfloat) params[2];
+ }
+ _mesa_PointParameterfvEXT(pname, p);
}
@@ -118,6 +123,11 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 ||
ctx->Point.Params[1] != 0.0 ||
ctx->Point.Params[2] != 0.0);
+
+ if (ctx->Point._Attenuated)
+ ctx->_TriangleCaps |= DD_POINT_ATTEN;
+ else
+ ctx->_TriangleCaps &= ~DD_POINT_ATTEN;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,