summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_pixeltex.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-01-28 04:25:56 +0000
committerBrian Paul <[email protected]>2002-01-28 04:25:56 +0000
commit6e1666437ea091ecc50ab2b56d87129318f641d2 (patch)
tree2ecf6d4bd87f0acd5ca3379654814273182106da /src/mesa/swrast/s_pixeltex.c
parent7956292a765910077f50352d7cd0174e1e66d26c (diff)
Still more texture/span simplification and clean-up.
Updated comments, fixed indentation, etc.
Diffstat (limited to 'src/mesa/swrast/s_pixeltex.c')
-rw-r--r--src/mesa/swrast/s_pixeltex.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_pixeltex.c b/src/mesa/swrast/s_pixeltex.c
index cbebeaf407b..82afab9ae93 100644
--- a/src/mesa/swrast/s_pixeltex.c
+++ b/src/mesa/swrast/s_pixeltex.c
@@ -1,4 +1,4 @@
-/* $Id: s_pixeltex.c,v 1.5 2002/01/27 18:32:03 brianp Exp $ */
+/* $Id: s_pixeltex.c,v 1.6 2002/01/28 04:25:56 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -94,21 +94,23 @@ _swrast_pixel_texture(GLcontext *ctx, struct sw_span *span)
{
if (ctx->Texture._ReallyEnabled & ~TEXTURE0_ANY) {
/* multitexture! */
- GLchan rgbaOut[MAX_WIDTH][4];
+ GLchan primary_rgba[MAX_WIDTH][4];
GLuint unit;
- MEMCPY(rgbaOut, span->color.rgba, 4 * span->end * sizeof(GLchan));
+ MEMCPY(primary_rgba, span->color.rgba, 4 * span->end * sizeof(GLchan));
for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
if (ctx->Texture.Unit[unit]._ReallyEnabled) {
pixeltexgen(ctx, span->end,
(const GLchan (*)[4]) span->color.rgba,
span->texcoords[unit]);
- _swrast_texture_fragments(ctx, unit, span, rgbaOut);
+ _swrast_texture_fragments(ctx, unit, span->end,
+ span->texcoords[unit],
+ span->lambda[unit],
+ (CONST GLchan (*)[4]) primary_rgba,
+ span->color.rgba);
}
}
-
- MEMCPY(span->color.rgba, rgbaOut, 4 * span->end * sizeof(GLchan));
}
else {
/* single texture, unit 0 */
@@ -116,6 +118,9 @@ _swrast_pixel_texture(GLcontext *ctx, struct sw_span *span)
pixeltexgen(ctx, span->end,
(const GLchan (*)[4]) span->color.rgba,
span->texcoords[0]);
- _swrast_texture_fragments(ctx, 0, span, span->color.rgba);
+ _swrast_texture_fragments(ctx, 0, span->end,
+ span->texcoords[0], span->lambda[0],
+ (CONST GLchan (*)[4]) span->color.rgba,
+ (GLchan (*)[4]) span->color.rgba);
}
}