diff options
author | Brian <[email protected]> | 2007-11-30 13:01:57 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-30 13:01:57 -0700 |
commit | fcd7c37fd3d0f61cf6ac81170bc0b3fca64ad9bb (patch) | |
tree | 4d914939e75c09c6d3592403b34cdf0ce044e361 /src/mesa/swrast/s_aatritemp.h | |
parent | 44c8dac0af8ae679b25b458980ce97d8ff410766 (diff) |
fix broken two-sided stencil
Diffstat (limited to 'src/mesa/swrast/s_aatritemp.h')
-rw-r--r-- | src/mesa/swrast/s_aatritemp.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h index 29609add179..0827b3db9eb 100644 --- a/src/mesa/swrast/s_aatritemp.h +++ b/src/mesa/swrast/s_aatritemp.h @@ -65,7 +65,7 @@ GLfloat attrPlane[FRAG_ATTRIB_MAX][4][4]; GLfloat wPlane[4]; /* win[3] */ #endif - GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceCullSign; (void) swrast; @@ -104,6 +104,7 @@ majDx = vMax->attrib[FRAG_ATTRIB_WPOS][0] - vMin->attrib[FRAG_ATTRIB_WPOS][0]; majDy = vMax->attrib[FRAG_ATTRIB_WPOS][1] - vMin->attrib[FRAG_ATTRIB_WPOS][1]; + /* front/back-face determination and cullling */ { const GLfloat botDx = vMid->attrib[FRAG_ATTRIB_WPOS][0] - vMin->attrib[FRAG_ATTRIB_WPOS][0]; const GLfloat botDy = vMid->attrib[FRAG_ATTRIB_WPOS][1] - vMin->attrib[FRAG_ATTRIB_WPOS][1]; @@ -112,6 +113,8 @@ if (area * bf < 0 || area == 0 || IS_INF_OR_NAN(area)) return; ltor = (GLboolean) (area < 0.0F); + + span.facing = area * swrast->_BackfaceSign > 0.0F; } /* Plane equation setup: |