Remove dead #define.

Add case for triangles culled front and back -- not handled by the
culling code inside swrast triangle routines.
This commit is contained in:
Keith Whitwell 2001-03-17 17:43:04 +00:00
parent c6e2d29cde
commit 47489c0721
2 changed files with 18 additions and 4 deletions

View file

@ -1,4 +1,4 @@
/* $Id: mtypes.h,v 1.25 2001/03/15 18:21:01 brianp Exp $ */
/* $Id: mtypes.h,v 1.26 2001/03/17 17:43:04 keithw Exp $ */
/*
* Mesa 3-D graphics library
@ -1363,7 +1363,6 @@ struct gl_extensions {
#define _DD_NEW_POINT_SMOOTH _NEW_POINT
#define _DD_NEW_POINT_SIZE _NEW_POINT
#define _DD_NEW_POINT_ATTEN _NEW_POINT
#define _DD_NEW_LIGHTING_CULL _NEW_LIGHT
#define _DD_NEW_TRI_CULL_FRONT_BACK _NEW_POLYGON
#define _DD_NEW_Z_NEVER _NEW_DEPTH
#define _DD_NEW_STENCIL _NEW_STENCIL

View file

@ -1,4 +1,4 @@
/* $Id: s_triangle.c,v 1.18 2001/03/12 00:48:42 gareth Exp $ */
/* $Id: s_triangle.c,v 1.19 2001/03/17 17:43:05 keithw Exp $ */
/*
* Mesa 3-D graphics library
@ -2218,7 +2218,13 @@ static void occlusion_zless_triangle( GLcontext *ctx,
#include "s_tritemp.h"
}
static void nodraw_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
{
(void) (ctx && v0 && v1 && v2);
}
void _swrast_add_spec_terms_triangle( GLcontext *ctx,
const SWvertex *v0,
@ -2264,6 +2270,15 @@ _swrast_choose_triangle( GLcontext *ctx )
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLboolean rgbmode = ctx->Visual.rgbMode;
if (ctx->Polygon.CullFlag &&
ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) {
dputs("nodraw_triangle");
swrast->Triangle = nodraw_triangle;
return;
}
if (ctx->RenderMode==GL_RENDER) {
if (ctx->Polygon.SmoothFlag) {