use FetchTexelf() in GetTexImage() to return float textures correctly
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 22 Apr 2004 01:08:36 +0000 (01:08 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 22 Apr 2004 01:08:36 +0000 (01:08 +0000)
src/mesa/main/teximage.c

index 1b889292f8ec8d054c94ff2e37e82ee855fff4b0..978148a5221e165ff62b2485b5c86b03b9d18a75 100644 (file)
@@ -1982,14 +1982,15 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
             }
             else {
                /* general case:  convert row to RGBA format */
-               GLchan rgba[MAX_WIDTH][4];
+               GLfloat rgba[MAX_WIDTH][4];
                GLint col;
                for (col = 0; col < width; col++) {
-                  (*texImage->FetchTexelc)(texImage, col, row, img, rgba[col]);
+                  (*texImage->FetchTexelf)(texImage, col, row, img, rgba[col]);
                }
-               _mesa_pack_rgba_span_chan(ctx, width, (const GLchan (*)[4])rgba,
-                                    format, type, dest, &ctx->Pack,
-                                    0 /* no image transfer */);
+               _mesa_pack_rgba_span_float(ctx, width,
+                                          (const GLfloat (*)[4]) rgba,
+                                          format, type, dest, &ctx->Pack,
+                                          0 /* no image transfer */);
             } /* format */
          } /* row */
       } /* img */