diff options
author | Eric Anholt <[email protected]> | 2007-09-19 11:05:36 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2007-09-20 09:04:20 -0700 |
commit | 4f1c9f7e510122b32c82ee9adbdb4987dae27afe (patch) | |
tree | 30cb409cf46cd11a6a14178985f7c69468e5b0f9 /progs/xdemos/glxgears.c | |
parent | e3745dac59602a9d21b49d602646de5aef95075f (diff) | |
parent | 45899a494c578d406b29e5ee17c0f1b6bf12c2de (diff) |
Merge branch 'master' into i915-unification
Conflicts:
src/mesa/drivers/dri/common/dri_drmpool.c
src/mesa/drivers/dri/i915tex/i915_vtbl.c
src/mesa/drivers/dri/i915tex/intel_batchbuffer.c
src/mesa/drivers/dri/i915tex/intel_context.c
Diffstat (limited to 'progs/xdemos/glxgears.c')
-rw-r--r-- | progs/xdemos/glxgears.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/progs/xdemos/glxgears.c b/progs/xdemos/glxgears.c index 75d63e51a2e..ec431c16f00 100644 --- a/progs/xdemos/glxgears.c +++ b/progs/xdemos/glxgears.c @@ -433,7 +433,7 @@ make_window( Display *dpy, const char *name, attr.override_redirect = fullscreen; mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect; - win = XCreateWindow( dpy, root, 0, 0, width, height, + win = XCreateWindow( dpy, root, x, y, width, height, 0, visinfo->depth, InputOutput, visinfo->visual, mask, &attr ); @@ -548,13 +548,16 @@ 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; + unsigned int winWidth = 300, winHeight = 300; + int x = 0, y = 0; Display *dpy; Window win; GLXContext ctx; @@ -576,6 +579,10 @@ main(int argc, char *argv[]) else if (strcmp(argv[i], "-fullscreen") == 0) { fullscreen = GL_TRUE; } + else if (i < argc-1 && strcmp(argv[i], "-geometry") == 0) { + XParseGeometry(argv[i+1], &x, &y, &winWidth, &winHeight); + i++; + } else { usage(); return -1; @@ -589,7 +596,7 @@ main(int argc, char *argv[]) return -1; } - make_window(dpy, "glxgears", 0, 0, winWidth, winHeight, &win, &ctx); + make_window(dpy, "glxgears", x, y, winWidth, winHeight, &win, &ctx); XMapWindow(dpy, win); glXMakeCurrent(dpy, win, ctx); |