From af2aa8e9cf88a9ee3ec338eddc9a47bf2f142cb7 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 21 Jul 2007 10:06:18 -0600 Subject: 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. --- src/mesa/drivers/dri/mga/mgatris.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/mga/mgatris.c') diff --git a/src/mesa/drivers/dri/mga/mgatris.c b/src/mesa/drivers/dri/mga/mgatris.c index 2b7ea05b14..91b413ae76 100644 --- a/src/mesa/drivers/dri/mga/mgatris.c +++ b/src/mesa/drivers/dri/mga/mgatris.c @@ -104,8 +104,10 @@ static void __inline__ mga_draw_quad( mgaContextPtr mmesa, static __inline__ void mga_draw_point( mgaContextPtr mmesa, mgaVertexPtr tmp ) { - GLfloat sz = mmesa->glCtx->Point._Size * .5; - int vertex_size = mmesa->vertex_size; + const GLfloat sz = 0.5 * CLAMP(mmesa->glCtx->Point.Size, + mmesa->glCtx->Const.MinPointSize, + mmesa->glCtx->Const.MaxPointSize); + const int vertex_size = mmesa->vertex_size; GLuint *vb = mgaAllocDmaLow( mmesa, 6 * 4 * vertex_size ); int j; @@ -165,7 +167,9 @@ static __inline__ void mga_draw_line( mgaContextPtr mmesa, GLuint vertex_size = mmesa->vertex_size; GLuint *vb = mgaAllocDmaLow( mmesa, 6 * 4 * vertex_size ); GLfloat dx, dy, ix, iy; - GLfloat width = mmesa->glCtx->Line._Width; + const GLfloat width = CLAMP(mmesa->glCtx->Line.Width, + mmesa->glCtx->Const.MinLineWidth, + mmesa->glCtx->Const.MaxLineWidth); GLint j; #if 0 -- cgit v1.2.3