diff options
author | Ingo Molnar <[email protected]> | 2007-08-07 09:53:48 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2007-08-07 09:57:02 +0200 |
commit | 4a8ad16ec0ab57bfa077c96f502cade7e656c01a (patch) | |
tree | aa24a1df98fe49e823c18bfd81ec17a7deb9e310 /progs/xdemos | |
parent | 0ed3ff5011442facdaccdb84518d7712833f9dab (diff) |
glxgears: Add an x/y window size parameter.
Diffstat (limited to 'progs/xdemos')
-rw-r--r-- | progs/xdemos/glxgears.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/progs/xdemos/glxgears.c b/progs/xdemos/glxgears.c index 75d63e51a2e..2425a2fa11c 100644 --- a/progs/xdemos/glxgears.c +++ b/progs/xdemos/glxgears.c @@ -548,13 +548,15 @@ usage(void) printf(" -stereo run in stereo mode\n"); printf(" -fullscreen run in fullscreen mode\n"); printf(" -info display OpenGL renderer info\n"); + printf(" -winwidth <width> window width (default: 300)\n"); + printf(" -winheight <height> window height (default: 300)\n"); } int main(int argc, char *argv[]) { - const int winWidth = 300, winHeight = 300; + int winWidth = 300, winHeight = 300; Display *dpy; Window win; GLXContext ctx; @@ -576,6 +578,14 @@ main(int argc, char *argv[]) else if (strcmp(argv[i], "-fullscreen") == 0) { fullscreen = GL_TRUE; } + else if (i < argc-1 && strcmp(argv[i], "-winwidth") == 0) { + winWidth = atoi(argv[i+1]); + i++; + } + else if (i < argc-1 && strcmp(argv[i], "-winheight") == 0) { + winHeight = atoi(argv[i+1]); + i++; + } else { usage(); return -1; |