summaryrefslogtreecommitdiff
path: root/src/mesa/main/points.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/points.c')
-rw-r--r--src/mesa/main/points.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index fbedbcb22c..1fe697033f 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.
*
@@ -77,8 +77,13 @@ _mesa_PointParameteri( GLenum pname, GLint param )
void GLAPIENTRY
_mesa_PointParameteriv( GLenum pname, const GLint *params )
{
- const GLfloat value = (GLfloat) params[0];
- _mesa_PointParameterfv(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_PointParameterfv(pname, p);
}
@@ -105,6 +110,11 @@ _mesa_PointParameterfv( 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,
@@ -190,7 +200,7 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
}
break;
case GL_POINT_SPRITE_COORD_ORIGIN:
- if (ctx->Extensions.ARB_point_sprite) {
+ if (ctx->Extensions.ARB_point_sprite || ctx->Extensions.NV_point_sprite) {
GLenum value = (GLenum) params[0];
if (value != GL_LOWER_LEFT && value != GL_UPPER_LEFT) {
_mesa_error(ctx, GL_INVALID_VALUE,