diff options
author | Brian Paul <[email protected]> | 2009-11-03 10:01:10 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-11-03 10:01:10 -0700 |
commit | a017ad2861e8df0cfea7808cf9c094b9c4bcac48 (patch) | |
tree | 74b785e9f1ff38a3d5aac39a171520ad1163df9b /progs/tests/texcmp.c | |
parent | 7ccf60ae40b2a201d446400bc8329df51e83cb6c (diff) |
progs/tests: debug code for getting texture component sizes
Diffstat (limited to 'progs/tests/texcmp.c')
-rw-r--r-- | progs/tests/texcmp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/progs/tests/texcmp.c b/progs/tests/texcmp.c index 3f2cee6e46d..c5d352fdaed 100644 --- a/progs/tests/texcmp.c +++ b/progs/tests/texcmp.c @@ -181,6 +181,18 @@ static void ReInit( GLenum TC, TEXTURE *Tx ) GL_TEXTURE_INTERNAL_FORMAT, &v); printf("Requested internal format = 0x%x, actual = 0x%x\n", TC, v); + if (0) { + GLint r, g, b, a, l, i; + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_RED_SIZE, &r); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_GREEN_SIZE, &g); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_BLUE_SIZE, &b); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_ALPHA_SIZE, &a); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_LUMINANCE_SIZE, &l); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTENSITY_SIZE, &i); + printf("Compressed Bits per R: %d G: %d B: %d A: %d L: %d I: %d\n", + r, g, b, a, l, i); + } + /* okay, now cache the compressed texture */ Tx->TC = TC; if (Tx->cData != NULL) { |