diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-03-21 00:11:25 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-03-21 00:11:25 +1100 |
commit | c7e9cb10937391c25a884fe62db91ea9b910d672 (patch) | |
tree | 42a854fef74df0d07421ebe466857260fe096e1a /progs | |
parent | 62767cf2dd1006621ecd6023b15d65b5cff41dfa (diff) | |
parent | 122ed506f4b808503b230bade421018614dbe696 (diff) |
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'progs')
-rw-r--r-- | progs/tests/mipmap_view.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/progs/tests/mipmap_view.c b/progs/tests/mipmap_view.c index d821f432f0..117e201718 100644 --- a/progs/tests/mipmap_view.c +++ b/progs/tests/mipmap_view.c @@ -55,17 +55,10 @@ Display(void) for (bias = -1; bias < 11; bias++) { - glRasterPos2f(x, y + TexHeight + 5); - sprintf(str, "Texture LOD Bias = %d", bias); - PrintString(str); - - glPushMatrix(); - glTranslatef(x, y, 0); - - glEnable(GL_TEXTURE_2D); - if (ScaleQuads) { if (bias > 0) { + if (texWidth == 1 && texHeight == 1) + break; texWidth = TexWidth >> bias; texHeight = TexHeight >> bias; if (texWidth < 1) @@ -79,6 +72,20 @@ Display(void) glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, bias); } + glRasterPos2f(x, y + TexHeight + 5); + if (ScaleQuads) + sprintf(str, "Texture Level %d: %d x %d", + (bias < 0 ? 0 : bias), + texWidth, texHeight); + else + sprintf(str, "Texture LOD Bias = %d", bias); + PrintString(str); + + glPushMatrix(); + glTranslatef(x, y, 0); + + glEnable(GL_TEXTURE_2D); + glBegin(GL_POLYGON); glTexCoord2f(0, 0); glVertex2f(0, 0); glTexCoord2f(1, 0); glVertex2f(texWidth, 0); |