diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2000-11-13 20:02:56 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2000-11-13 20:02:56 +0000 |
commit | 1e1aac034c986a08248861363c0baa27dc2ae2d5 (patch) | |
tree | d6aa2dd575eae913007d089928d765be8c867126 /src/mesa/swrast/s_tritemp.h | |
parent | 6b8ae62d6b6a3b06c51628123fc30634cacf9c7c (diff) |
Cleanup of derived state calculation prior to seperating software T&L
into a new directory. Specifically the handling of changes to lighting
lighting space (light in model vs. light in eye) have been revamped.
Moved several derived values used only by swrast into that directory.
Removed direct calls to swrast_flush() from vbrender.c -- pushed into
ctx->Driver.RenderFinish.
Optimized flat-shading case in swrast_setup.
Diffstat (limited to 'src/mesa/swrast/s_tritemp.h')
-rw-r--r-- | src/mesa/swrast/s_tritemp.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h index a87b24c40c..8fdbec9d18 100644 --- a/src/mesa/swrast/s_tritemp.h +++ b/src/mesa/swrast/s_tritemp.h @@ -1,4 +1,4 @@ -/* $Id: s_tritemp.h,v 1.2 2000/11/05 18:24:41 keithw Exp $ */ +/* $Id: s_tritemp.h,v 1.3 2000/11/13 20:02:57 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -96,7 +96,7 @@ EdgeT eMaj, eTop, eBot; GLfloat oneOverArea; SWvertex *vMin, *vMid, *vMax; /* Y(vMin)<=Y(vMid)<=Y(vMax) */ - float bf = ctx->_backface_sign; + float bf = SWRAST_CONTEXT(ctx)->_backface_sign; /* find the order of the 3 vertices along the Y axis */ { @@ -713,8 +713,10 @@ dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(DEPTH_TYPE); # endif } - ffog = FloatToFixed(vLower->fog) * 256 + dfogdx * adjx + dfogdy * adjy + FIXED_HALF; - fdfogOuter = SignedFloatToFixed(dfogdy + dxOuter * dfogdx); + { + ffog = FloatToFixed(vLower->fog) * 256 + dfogdx * adjx + dfogdy * adjy + FIXED_HALF; + fdfogOuter = SignedFloatToFixed(dfogdy + dxOuter * dfogdx); + } #endif #ifdef INTERP_RGB fr = (GLfixed)(IntToFixed(vLower->color[0]) @@ -980,7 +982,7 @@ zRow = (DEPTH_TYPE *) ((GLubyte*)zRow + dZRowOuter); # endif fz += fdzOuter; - ffog += fdfogOuter; + ffog += fdfogOuter; #endif #ifdef INTERP_RGB fr += fdrOuter; fg += fdgOuter; fb += fdbOuter; |