summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2001-03-17 17:43:04 +0000
committerKeith Whitwell <[email protected]>2001-03-17 17:43:04 +0000
commit47489c0721348d8f5e5f17b4af63b1c601045116 (patch)
treee9112aaf41e483e6316d14c12492ad78d726fe26 /src/mesa
parentc6e2d29cdebc4b14cb4d5bea44ee67f7e22dd21d (diff)
Remove dead #define.
Add case for triangles culled front and back -- not handled by the culling code inside swrast triangle routines.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h3
-rw-r--r--src/mesa/swrast/s_triangle.c19
2 files changed, 18 insertions, 4 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 49c72f4e8fe..f54b8d5fa9d 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index a581acfcfb9..4bf83d6bf21 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -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) {