From 20cbbf845999e49c63b69adf9288a161fd95ecd7 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 25 Jun 2002 08:41:06 +0000 Subject: Check for GL_FRONT_AND_BACK culling before installing optimized tri funcs. --- src/mesa/drivers/osmesa/osmesa.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 908198867f2..6ea85ae6298 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.71.2.6 2002/06/14 03:49:10 brianp Exp $ */ +/* $Id: osmesa.c,v 1.71.2.7 2002/06/25 08:41:06 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -1782,6 +1782,7 @@ osmesa_choose_line_function( GLcontext *ctx ) osmesa->format != OSMESA_BGRA && osmesa->format != OSMESA_ARGB) return NULL; + if (swrast->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE @@ -1931,6 +1932,9 @@ osmesa_choose_triangle_function( GLcontext *ctx ) if (osmesa->format != OSMESA_RGBA && osmesa->format != OSMESA_BGRA && osmesa->format != OSMESA_ARGB) return (swrast_tri_func) NULL; + if (ctx->Polygon.CullFlag && + ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK)) + return (swrast_tri_func) NULL; if (swrast->_RasterMask == DEPTH_BIT && ctx->Depth.Func == GL_LESS && -- cgit v1.2.3