From 2b2e925ea4a5652b0ab73b1efbce345a42663842 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 7 Apr 2000 16:27:26 +0000 Subject: added GL_SGIX/SGIS_pixel_texture extension --- src/mesa/main/drawpix.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/drawpix.c') diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index d8b35279439..23479bf321f 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -1,4 +1,4 @@ -/* $Id: drawpix.c,v 1.16 2000/04/01 05:42:06 brianp Exp $ */ +/* $Id: drawpix.c,v 1.17 2000/04/07 16:27:26 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -37,9 +37,11 @@ #include "mem.h" #include "mmath.h" #include "pixel.h" +#include "pixeltex.h" #include "span.h" #include "state.h" #include "stencil.h" +#include "texture.h" #include "types.h" #include "zoom.h" #endif @@ -125,6 +127,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y, && ctx->Pixel.AlphaBias==0.0 && ctx->Pixel.AlphaScale==1.0 && ctx->Pixel.IndexShift==0 && ctx->Pixel.IndexOffset==0 && ctx->Pixel.MapColorFlag==0 + && ctx->Texture.ReallyEnabled == 0 && unpack->Alignment==1 && !unpack->SwapBytes && !unpack->LsbFirst) { @@ -645,6 +648,17 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, _mesa_unpack_ubyte_color_span(ctx, width, GL_RGBA, (void*) rgba, format, type, source, unpack, GL_TRUE); + if (ctx->Texture.ReallyEnabled && ctx->Pixel.PixelTextureEnabled) { + GLfloat s[MAX_WIDTH], t[MAX_WIDTH], r[MAX_WIDTH], q[MAX_WIDTH]; + GLuint unit; + /* XXX not sure how multitexture is supposed to work here */ + 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, rgba); + } + } + if (quickDraw) { (*ctx->Driver.WriteRGBASpan)( ctx, width, x, y, (CONST GLubyte (*)[]) rgba, NULL); -- cgit v1.2.3