diff options
author | Brian Paul <[email protected]> | 2004-04-22 01:08:36 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-04-22 01:08:36 +0000 |
commit | 5b45c1148624f0ee2b93cc15f5c3ae21667f5463 (patch) | |
tree | 8a5287c50dc2fbc0d19d45c6ebbe562c26aa359f /src/mesa/main/teximage.c | |
parent | 3623733472905773957158444aff7d4606d640ff (diff) |
use FetchTexelf() in GetTexImage() to return float textures correctly
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 1b889292f8e..978148a5221 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -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 */ |