summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-05-15 15:14:37 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-05-15 15:14:37 +0000
commitc8ea111166d55ec0bc12f08694117b974d570da8 (patch)
treeddb0d7961d9925d45bd93d8a883c208cb0a2ee54 /progs
parent20215ecc7ded503d7d9cb6e8ba2f7a9c1621dd15 (diff)
usage() function
Diffstat (limited to 'progs')
-rw-r--r--progs/xdemos/glxgears.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/progs/xdemos/glxgears.c b/progs/xdemos/glxgears.c
index 00b05dc980..304fd4befa 100644
--- a/progs/xdemos/glxgears.c
+++ b/progs/xdemos/glxgears.c
@@ -540,6 +540,17 @@ event_loop(Display *dpy, Window win)
}
+static void
+usage(void)
+{
+ printf("Usage:\n");
+ printf(" -display <displayname> set the display to run on\n");
+ printf(" -stereo run in stereo mode\n");
+ printf(" -fullscreen run in fullscreen mode\n");
+ printf(" -info display OpenGL renderer info\n");
+}
+
+
int
main(int argc, char *argv[])
{
@@ -564,8 +575,10 @@ main(int argc, char *argv[])
else if (strcmp(argv[i], "-fullscreen") == 0) {
fullscreen = GL_TRUE;
}
- else
- printf("Warrning: unknown parameter: %s\n", argv[i]);
+ else {
+ usage();
+ return -1;
+ }
}
dpy = XOpenDisplay(dpyName);