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_readpix.c | |
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_readpix.c')
-rw-r--r-- | src/mesa/swrast/s_readpix.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index ba3aca53927..ac91dadcf3a 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -1,4 +1,4 @@ -/* $Id: s_readpix.c,v 1.2 2000/11/05 18:24:40 keithw Exp $ */ +/* $Id: s_readpix.c,v 1.3 2000/11/13 20:02:57 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -520,24 +520,24 @@ read_fast_rgba_pixels( GLcontext *ctx, rowLength = width; /* horizontal clipping */ - if (srcX < ctx->ReadBuffer->Xmin) { - skipPixels += (ctx->ReadBuffer->Xmin - srcX); - readWidth -= (ctx->ReadBuffer->Xmin - srcX); - srcX = ctx->ReadBuffer->Xmin; + if (srcX < ctx->ReadBuffer->_Xmin) { + skipPixels += (ctx->ReadBuffer->_Xmin - srcX); + readWidth -= (ctx->ReadBuffer->_Xmin - srcX); + srcX = ctx->ReadBuffer->_Xmin; } - if (srcX + readWidth > ctx->ReadBuffer->Xmax) - readWidth -= (srcX + readWidth - ctx->ReadBuffer->Xmax); + if (srcX + readWidth > ctx->ReadBuffer->_Xmax) + readWidth -= (srcX + readWidth - ctx->ReadBuffer->_Xmax); if (readWidth <= 0) return GL_TRUE; /* vertical clipping */ - if (srcY < ctx->ReadBuffer->Ymin) { - skipRows += (ctx->ReadBuffer->Ymin - srcY); - readHeight -= (ctx->ReadBuffer->Ymin - srcY); - srcY = ctx->ReadBuffer->Ymin; + if (srcY < ctx->ReadBuffer->_Ymin) { + skipRows += (ctx->ReadBuffer->_Ymin - srcY); + readHeight -= (ctx->ReadBuffer->_Ymin - srcY); + srcY = ctx->ReadBuffer->_Ymin; } - if (srcY + readHeight > ctx->ReadBuffer->Ymax) - readHeight -= (srcY + readHeight - ctx->ReadBuffer->Ymax); + if (srcY + readHeight > ctx->ReadBuffer->_Ymax) + readHeight -= (srcY + readHeight - ctx->ReadBuffer->_Ymax); if (readHeight <= 0) return GL_TRUE; |