summaryrefslogtreecommitdiffstats
path: root/progs/tests
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-09-25 16:38:14 -0600
committerBrian Paul <[email protected]>2009-09-28 08:44:43 -0600
commit653ae04bea557085778c599c3b8f32a6f1479686 (patch)
tree56e59523263c06ab2960a0600fc071ba7a9e1ad2 /progs/tests
parentc8de476189de4df8de5148354b2f99cbb6dfd54b (diff)
progs/tests: print usage info upon SPACE/u
Diffstat (limited to 'progs/tests')
-rw-r--r--progs/tests/mipmap_limits.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/progs/tests/mipmap_limits.c b/progs/tests/mipmap_limits.c
index b8e52ddd7b8..9418e909815 100644
--- a/progs/tests/mipmap_limits.c
+++ b/progs/tests/mipmap_limits.c
@@ -250,6 +250,21 @@ myReshape(int w, int h)
glLoadIdentity();
}
+
+static void
+usage(void)
+{
+ printf("usage:\n");
+ printf(" b/B decrease/increase GL_TEXTURE_BASE_LEVEL\n");
+ printf(" m/M decrease/increase GL_TEXTURE_MAX_LEVEL\n");
+ printf(" n/N decrease/increase GL_TEXTURE_MIN_LOD\n");
+ printf(" x/X decrease/increase GL_TEXTURE_MAX_LOD\n");
+ printf(" l/L decrease/increase GL_TEXTURE_LOD_BIAS\n");
+ printf(" f toggle nearest/linear filtering\n");
+ printf(" t toggle texture color/image\n");
+ printf(" SPACE reset values\n");
+}
+
static void
key(unsigned char k, int x, int y)
{
@@ -305,6 +320,9 @@ key(unsigned char k, int x, int y)
break;
case ' ':
InitValues();
+ /* fall-through */
+ case 'u':
+ usage();
break;
case 27: /* Escape */
exit(0);
@@ -316,21 +334,6 @@ key(unsigned char k, int x, int y)
}
-static void
-usage(void)
-{
- printf("usage:\n");
- printf(" b/B decrease/increase GL_TEXTURE_BASE_LEVEL\n");
- printf(" m/M decrease/increase GL_TEXTURE_MAX_LEVEL\n");
- printf(" n/N decrease/increase GL_TEXTURE_MIN_LOD\n");
- printf(" x/X decrease/increase GL_TEXTURE_MAX_LOD\n");
- printf(" l/L decrease/increase GL_TEXTURE_LOD_BIAS\n");
- printf(" f toggle nearest/linear filtering\n");
- printf(" t toggle texture color/image\n");
- printf(" SPACE reset values\n");
-}
-
-
int
main(int argc, char **argv)
{