diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-11-22 09:33:57 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-11-22 09:36:35 -0700 |
commit | c85d31f4a049193afe2452b4f130671b16fbc32c (patch) | |
tree | a8faaf5c57a9c225915a4bc5fb65b2dfeae7be3d | |
parent | 24af5c44da2b57707976728c9374f44b20b4efe4 (diff) |
Recompute ctx->Point._Size if GL_POINT_SIZE_MIN/MAX changes.
Note that all the point size clamping stuff has been redone in Mesa/master.
-rw-r--r-- | src/mesa/main/mtypes.h | 4 | ||||
-rw-r--r-- | src/mesa/main/points.c | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index d00f2efc716..2cc0622ec8a 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -7,7 +7,7 @@ /* * Mesa 3-D graphics library - * Version: 6.5.3 + * Version: 7.0.3 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * @@ -1063,7 +1063,7 @@ struct gl_point_attrib { GLboolean SmoothFlag; /**< True if GL_POINT_SMOOTH is enabled */ GLfloat Size; /**< User-specified point size */ - GLfloat _Size; /**< Size clamped to Const.Min/MaxPointSize */ + GLfloat _Size; /**< Size clamped to user limits */ GLfloat Params[3]; /**< GL_EXT_point_parameters */ GLfloat MinSize, MaxSize; /**< GL_EXT_point_parameters */ GLfloat Threshold; /**< GL_EXT_point_parameters */ diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index 8825bb18192..5fa905ffc6e 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.1 + * Version: 7.0.3 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * @@ -57,6 +57,7 @@ _mesa_PointSize( GLfloat size ) FLUSH_VERTICES(ctx, _NEW_POINT); ctx->Point.Size = size; + /* _Size is only used for non-attenuated path */ ctx->Point._Size = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize); @@ -150,6 +151,10 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params) return; FLUSH_VERTICES(ctx, _NEW_POINT); ctx->Point.MinSize = params[0]; + /* re-clamp _Size */ + ctx->Point._Size = CLAMP(ctx->Point.Size, + ctx->Point.MinSize, + ctx->Point.MaxSize); } else { _mesa_error(ctx, GL_INVALID_ENUM, @@ -168,6 +173,10 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params) return; FLUSH_VERTICES(ctx, _NEW_POINT); ctx->Point.MaxSize = params[0]; + /* re-clamp _Size */ + ctx->Point._Size = CLAMP(ctx->Point.Size, + ctx->Point.MinSize, + ctx->Point.MaxSize); } else { _mesa_error(ctx, GL_INVALID_ENUM, |