summaryrefslogtreecommitdiff
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-09-30 18:42:29 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-09-30 18:42:29 +0000
commit9c05c0494d06dcf429d8489107be49e339305690 (patch)
tree2f3f80b9f30d84c8d20f388152e3220663df29e8 /src/mesa/main/drawpix.c
parent4f66498304674aa2e016267e4d6c4b878c3ad1e5 (diff)
support for N texture units
Diffstat (limited to 'src/mesa/main/drawpix.c')
-rw-r--r--src/mesa/main/drawpix.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 52e27fe5da..0da0718c08 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: drawpix.c,v 1.35 2000/09/26 20:53:53 brianp Exp $ */
+/* $Id: drawpix.c,v 1.36 2000/09/30 18:42:29 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -820,11 +820,13 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
MEMCPY(primary_rgba, rgba, 4 * width * sizeof(GLubyte));
- for (unit = 0; unit < MAX_TEXTURE_UNITS; unit++) {
- _mesa_pixeltexgen(ctx, width, (const GLubyte (*)[4]) rgba,
- s, t, r, q);
- gl_texture_pixels(ctx, unit, width, s, t, r, NULL,
- primary_rgba, rgba);
+ for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
+ if (ctx->Texture.Unit[unit].ReallyEnabled) {
+ _mesa_pixeltexgen(ctx, width, (const GLubyte (*)[4]) rgba,
+ s, t, r, q);
+ gl_texture_pixels(ctx, unit, width, s, t, r, NULL,
+ primary_rgba, rgba);
+ }
}
}