summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-03-17 17:43:04 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-03-17 17:43:04 +0000
commit47489c0721348d8f5e5f17b4af63b1c601045116 (patch)
treee9112aaf41e483e6316d14c12492ad78d726fe26 /src/mesa/swrast
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/swrast')
-rw-r--r--src/mesa/swrast/s_triangle.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index a581acfcfb..4bf83d6bf2 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) {