From 4753d60dd070bb08d0116076bcc08025c86ce857 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 15 Jun 2002 02:38:15 +0000 Subject: Added ctx parameter to _mesa_debug() Added _mesa_printf() Updated SetDrawBuffer() function in all drivers (ala 4.0.3) Import 4.0.3/DRI changes. --- src/mesa/swrast/s_span.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src/mesa/swrast/s_span.c') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 1e3c710b8a..0a1e317608 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) -- cgit v1.2.3