summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-06-15 02:38:15 +0000
committerBrian Paul <[email protected]>2002-06-15 02:38:15 +0000
commit4753d60dd070bb08d0116076bcc08025c86ce857 (patch)
treeb1516c35acfa41ae17d575b92b8c776bd530297a /src/mesa/swrast/s_span.c
parent5e54ddc3a69df060c3ca2acbdd45247e30c947d6 (diff)
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.
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c24
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)