mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
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.
This commit is contained in:
parent
24af5c44da
commit
c85d31f4a0
2 changed files with 12 additions and 3 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue