fix glDrawPixels + fragment program problem
authorBrian <brian@i915.localnet.net>
Wed, 20 Jun 2007 16:56:13 +0000 (10:56 -0600)
committerBrian <brian@i915.localnet.net>
Wed, 20 Jun 2007 16:56:13 +0000 (10:56 -0600)
src/mesa/swrast/s_span.c

index 90a3d5545f8cf290664f4a27d705f9d40732cdcb..3aaa3395e4c155324017fdbdcd394410bb7c8cd4 100644 (file)
@@ -1169,10 +1169,17 @@ shade_texture_span(GLcontext *ctx, SWspan *span)
    if (ctx->FragmentProgram._Current ||
        ctx->ATIFragmentShader._Enabled) {
       /* programmable shading */
+      if (span->primitive == GL_BITMAP) {
+         if (span->array->ChanType != GL_FLOAT)
+            convert_color_type(span, GL_FLOAT, 0);
+         interpolate_active_attribs(ctx, span, ~FRAG_ATTRIB_COL0);
+      }
+      else {
+         /* point, line, triangle */
+         interpolate_active_attribs(ctx, span, ~0);
+      }
       span->array->ChanType = GL_FLOAT;
 
-      interpolate_active_attribs(ctx, span, ~0);
-
       if (!(span->arrayMask & SPAN_Z))
          _swrast_span_interpolate_z (ctx, span);