diff options
author | Brian Paul <[email protected]> | 2000-03-29 18:13:59 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-03-29 18:13:59 +0000 |
commit | 4827179cc0d314f69671e97dcb016f5a3b90a213 (patch) | |
tree | e524f42d836a25ba11324859b2135b0e47966fb7 /src/mesa/main/teximage.c | |
parent | 8fd9fcbc2d6fd6563165fad98258b0d6d974fc62 (diff) |
changes for single-copy textures
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 2547d6cadac..81f6852baf0 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -49,6 +49,29 @@ */ +#ifdef DEBUG +static void PrintTexture(int w, int h, int c, const GLubyte *data) +{ + int i, j; + for (i = 0; i < h; i++) { + for (j = 0; j < w; j++) { + if (c==1) + printf("%02x ", data[0]); + else if (c==2) + printf("%02x %02x ", data[0], data[1]); + else if (c==3) + printf("%02x %02x %02x ", data[0], data[1], data[2]); + else if (c==4) + printf("%02x %02x %02x %02x ", data[0], data[1], data[2], data[3]); + data += c; + } + printf("\n"); + } +} +#endif + + + /* * Compute log base 2 of n. * If n isn't an exact power of two return -1. @@ -1377,7 +1400,7 @@ _mesa_get_teximage_from_driver( GLcontext *ctx, GLenum target, GLint level, if (!ctx->Driver.GetTexImage) return; - image = (*ctx->Driver.GetTexImage)( ctx, target, level, + image = (*ctx->Driver.GetTexImage)( ctx, target, level, texObj, &imgFormat, &imgType, &freeImage); if (!image) return; |