@@ -1,4 +1,4 @@ | |||
/* $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 | |||
@@ -162,7 +162,7 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) | |||
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; |
@@ -1,4 +1,4 @@ | |||
/* $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 | |||
@@ -149,7 +149,7 @@ | |||
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; | |||
} | |||
@@ -1,4 +1,4 @@ | |||
/* $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 | |||
@@ -180,6 +180,13 @@ | |||
} | |||
#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 |
@@ -1,4 +1,4 @@ | |||
/* $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 | |||
@@ -119,6 +119,14 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) | |||
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); |
@@ -1,4 +1,4 @@ | |||
/* $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 | |||
@@ -199,7 +199,7 @@ | |||
if (area * bf < 0.0) | |||
return; | |||
if (area == 0.0F) | |||
if (area == 0.0F || IS_INF_OR_NAN(area)) | |||
return; | |||
oneOverArea = 1.0F / area; |