summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-21 10:06:18 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-21 10:06:41 -0600
commitaf2aa8e9cf88a9ee3ec338eddc9a47bf2f142cb7 (patch)
tree39abc89e77ed3a102551d1c18bf11a13f2310fa6 /src/mesa/main
parent5842bc3bf9e33333b122ce7fd6bf108aab780111 (diff)
Remove ctx->Point._Size and ctx->Line._Width.
The clamping for these values depends on whether we're drawing AA or non-AA points, lines. Defer clamping until drawing time. Drivers could compute and keep clamped AA and clamped non-AA values if desired.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/lines.c8
-rw-r--r--src/mesa/main/mtypes.h2
-rw-r--r--src/mesa/main/points.c5
-rw-r--r--src/mesa/main/state.c4
4 files changed, 4 insertions, 15 deletions
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c
index dc7195d4eb..0c2dbf915a 100644
--- a/src/mesa/main/lines.c
+++ b/src/mesa/main/lines.c
@@ -55,9 +55,6 @@ _mesa_LineWidth( GLfloat width )
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.Width = width;
- ctx->Line._Width = CLAMP(width,
- ctx->Const.MinLineWidth,
- ctx->Const.MaxLineWidth);
if (ctx->Driver.LineWidth)
ctx->Driver.LineWidth(ctx, width);
@@ -105,13 +102,12 @@ _mesa_LineStipple( GLint factor, GLushort pattern )
* Initializes __GLcontextRec::Line and line related constants in
* __GLcontextRec::Const.
*/
-void GLAPIENTRY _mesa_init_line( GLcontext * ctx )
+void GLAPIENTRY
+_mesa_init_line( GLcontext * ctx )
{
- /* Line group */
ctx->Line.SmoothFlag = GL_FALSE;
ctx->Line.StippleFlag = GL_FALSE;
ctx->Line.Width = 1.0;
- ctx->Line._Width = 1.0;
ctx->Line.StipplePattern = 0xffff;
ctx->Line.StippleFactor = 1;
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 709b88d2ef..a5fdd88262 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -917,7 +917,6 @@ struct gl_line_attrib
GLushort StipplePattern; /**< Stipple pattern */
GLint StippleFactor; /**< Stipple repeat factor */
GLfloat Width; /**< Line width */
- GLfloat _Width; /**< Clamped Line width */
};
@@ -1063,7 +1062,6 @@ 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 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 0f562420b0..e83db5de78 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -57,10 +57,6 @@ _mesa_PointSize( GLfloat size )
FLUSH_VERTICES(ctx, _NEW_POINT);
ctx->Point.Size = size;
- /* XXX correct clamp limits? */
- ctx->Point._Size = CLAMP(ctx->Point.Size,
- ctx->Point.MinSize,
- ctx->Point.MaxSize);
if (ctx->Driver.PointSize)
ctx->Driver.PointSize(ctx, size);
@@ -253,7 +249,6 @@ _mesa_init_point(GLcontext *ctx)
ctx->Point.SmoothFlag = GL_FALSE;
ctx->Point.Size = 1.0;
- ctx->Point._Size = 1.0;
ctx->Point.Params[0] = 1.0;
ctx->Point.Params[1] = 0.0;
ctx->Point.Params[2] = 0.0;
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 66f8ac6408..444f227760 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -1068,7 +1068,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
if (1/*new_state & _NEW_POINT*/) {
if (ctx->Point.SmoothFlag)
ctx->_TriangleCaps |= DD_POINT_SMOOTH;
- if (ctx->Point._Size != 1.0F)
+ if (ctx->Point.Size != 1.0F)
ctx->_TriangleCaps |= DD_POINT_SIZE;
if (ctx->Point._Attenuated)
ctx->_TriangleCaps |= DD_POINT_ATTEN;
@@ -1082,7 +1082,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
ctx->_TriangleCaps |= DD_LINE_SMOOTH;
if (ctx->Line.StippleFlag)
ctx->_TriangleCaps |= DD_LINE_STIPPLE;
- if (ctx->Line._Width != 1.0)
+ if (ctx->Line.Width != 1.0)
ctx->_TriangleCaps |= DD_LINE_WIDTH;
}