diff options
Diffstat (limited to 'xc/extras/Mesa/src/swrast_setup/ss_tritmp.h')
-rw-r--r-- | xc/extras/Mesa/src/swrast_setup/ss_tritmp.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/xc/extras/Mesa/src/swrast_setup/ss_tritmp.h b/xc/extras/Mesa/src/swrast_setup/ss_tritmp.h index 9801b7ab7..77219fc60 100644 --- a/xc/extras/Mesa/src/swrast_setup/ss_tritmp.h +++ b/xc/extras/Mesa/src/swrast_setup/ss_tritmp.h @@ -1,10 +1,9 @@ -/* $Id: ss_tritmp.h,v 1.1.1.1 2002/10/22 13:06:39 alanh Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 5.0 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,7 +23,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell <keithw@valinux.com> + * Keith Whitwell <keith@tungstengraphics.com> */ @@ -36,7 +35,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) GLfloat z[3]; GLfloat offset; GLenum mode = GL_FILL; - GLuint facing; + GLuint facing = 0; v[0] = &verts[e0]; v[1] = &verts[e1]; @@ -54,6 +53,8 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) if (IND & (SS_TWOSIDE_BIT | SS_UNFILLED_BIT)) { facing = (cc < 0.0) ^ ctx->Polygon._FrontBit; + if (ctx->Stencil.TestTwoSide) + ctx->_Facing = facing; /* for 2-sided stencil test */ if (IND & SS_UNFILLED_BIT) mode = facing ? ctx->Polygon.BackMode : ctx->Polygon.FrontMode; @@ -110,14 +111,14 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) v[1]->win[2] += offset; v[2]->win[2] += offset; } - _swsetup_render_point_tri( ctx, e0, e1, e2 ); + _swsetup_render_point_tri( ctx, e0, e1, e2, facing ); } else if (mode == GL_LINE) { if ((IND & SS_OFFSET_BIT) && ctx->Polygon.OffsetLine) { v[0]->win[2] += offset; v[1]->win[2] += offset; v[2]->win[2] += offset; } - _swsetup_render_line_tri( ctx, e0, e1, e2 ); + _swsetup_render_line_tri( ctx, e0, e1, e2, facing ); } else { if ((IND & SS_OFFSET_BIT) && ctx->Polygon.OffsetFill) { v[0]->win[2] += offset; |