OSDN Git Service

clamp size of wide points
authorDaniel Borca <dborca@users.sourceforge.net>
Mon, 20 Sep 2004 08:33:38 +0000 (08:33 +0000)
committerDaniel Borca <dborca@users.sourceforge.net>
Mon, 20 Sep 2004 08:33:38 +0000 (08:33 +0000)
src/mesa/drivers/glide/fxtris.c

index 05fe1b2..4270ceb 100644 (file)
@@ -351,7 +351,9 @@ static void fx_draw_point_wide ( fxMesaContext fxMesa,
  GrVertex *_v_[3];
 
  const GLcontext *ctx = fxMesa->glCtx;
- const GLfloat psize = (ctx->_TriangleCaps & DD_POINT_ATTEN) ? v0->psize : ctx->Point.Size;
+ const GLfloat psize = (ctx->_TriangleCaps & DD_POINT_ATTEN)
+                       ? CLAMP(v0->psize, ctx->Point.MinSize, ctx->Point.MaxSize)
+                      : ctx->Point._Size; /* clamped */
 
  if (ctx->Point.PointSprite) {
     fx_draw_point_sprite(fxMesa, v0, psize);
@@ -426,7 +428,9 @@ static void fx_draw_point_wide_aa ( fxMesaContext fxMesa,
  GrVertex vtxB, vtxC;
 
  const GLcontext *ctx = fxMesa->glCtx;
- const GLfloat psize = (ctx->_TriangleCaps & DD_POINT_ATTEN) ? v0->psize : ctx->Point.Size;
+ const GLfloat psize = (ctx->_TriangleCaps & DD_POINT_ATTEN)
+                       ? CLAMP(v0->psize, ctx->Point.MinSize, ctx->Point.MaxSize)
+                      : ctx->Point._Size; /* clamped */
 
  if (ctx->Point.PointSprite) {
     fx_draw_point_sprite(fxMesa, v0, psize);