-/* $Id: s_aalinetemp.h,v 1.14 2001/09/19 20:30:44 kschultz Exp $ */
+/* $Id: s_aalinetemp.h,v 1.15 2001/12/05 10:24:31 keithw Exp $ */
/*
* Mesa 3-D graphics library
line.len = (GLfloat) sqrt(line.dx * line.dx + line.dy * line.dy);
line.halfWidth = 0.5F * ctx->Line.Width;
- if (line.len == 0.0)
+ if (line.len == 0.0 || IS_INF_OR_NAN(line.len))
return;
line.xAdj = line.dx / line.len * line.halfWidth;
-/* $Id: s_aatritemp.h,v 1.21 2001/09/19 20:30:44 kschultz Exp $ */
+/* $Id: s_aatritemp.h,v 1.22 2001/12/05 10:24:31 keithw Exp $ */
/*
* Mesa 3-D graphics library
const GLfloat area = majDx * botDy - botDx * majDy;
ltor = (GLboolean) (area < 0.0F);
/* Do backface culling */
- if (area * bf < 0 || area * area < .0025)
+ if (area * bf < 0 || area == 0 || IS_INF_OR_NAN(area))
return;
}
-/* $Id: s_linetemp.h,v 1.9 2001/07/13 20:07:37 brianp Exp $ */
+/* $Id: s_linetemp.h,v 1.10 2001/12/05 10:24:31 keithw Exp $ */
/*
* Mesa 3-D graphics library
}
#endif
+ /* Cull primitives with malformed coordinates.
+ */
+ {
+ float tmp = vert0->win[0] + vert0->win[1] + vert1->win[0] + vert1->win[1];
+ if (IS_INF_OR_NAN(tmp))
+ return;
+ }
/*
* Despite being clipped to the view volume, the line's window coordinates
-/* $Id: s_pointtemp.h,v 1.10 2001/09/19 20:30:44 kschultz Exp $ */
+/* $Id: s_pointtemp.h,v 1.11 2001/12/05 10:24:31 keithw Exp $ */
/*
* Mesa 3-D graphics library
size = ctx->Point._Size;
#endif
+ /* Cull primitives with malformed coordinates.
+ */
+ {
+ float tmp = vert->win[0] + vert->win[1];
+ if (IS_INF_OR_NAN(tmp))
+ return;
+ }
+
#if FLAGS & SPRITE
{
SWcontext *swctx = SWRAST_CONTEXT(ctx);
-/* $Id: s_tritemp.h,v 1.27 2001/09/19 20:30:44 kschultz Exp $ */
+/* $Id: s_tritemp.h,v 1.28 2001/12/05 10:24:31 keithw Exp $ */
/*
* Mesa 3-D graphics library
if (area * bf < 0.0)
return;
- if (area == 0.0F)
+ if (area == 0.0F || IS_INF_OR_NAN(area))
return;
oneOverArea = 1.0F / area;