diff options
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r-- | src/mesa/swrast/s_span.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 1e3c710b8a1..0a1e3176083 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1,4 +1,4 @@ -/* $Id: s_span.c,v 1.42 2002/05/02 00:59:20 brianp Exp $ */ +/* $Id: s_span.c,v 1.43 2002/06/15 02:38:17 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -119,6 +119,28 @@ _mesa_span_default_color( GLcontext *ctx, struct sw_span *span ) } +/** + * Init span's texcoord interpolation values to the RasterPos texcoords. + * Used during setup for glDraw/CopyPixels. + */ +void +_mesa_span_default_texcoords( GLcontext *ctx, struct sw_span *span ) +{ + GLuint i; + for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { + span->tex[i][0] = ctx->Current.RasterTexCoords[i][0]; + span->tex[i][1] = ctx->Current.RasterTexCoords[i][1]; + span->tex[i][2] = ctx->Current.RasterTexCoords[i][2]; + span->tex[i][3] = ctx->Current.RasterTexCoords[i][3]; + span->texStepX[i][0] = 0.0; + span->texStepX[i][1] = 0.0; + span->texStepX[i][2] = 0.0; + span->texStepX[i][3] = 0.0; + } + span->interpMask |= SPAN_TEXTURE; +} + + /* Fill in the span.color.rgba array from the interpolation values */ static void interpolate_colors(GLcontext *ctx, struct sw_span *span) |