diff options
author | Brian Paul <[email protected]> | 2005-01-04 00:58:29 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-01-04 00:58:29 +0000 |
commit | f72e4424d960b1751845d9e0579e8fdcca93b3d0 (patch) | |
tree | 195eb903de1a6d6c39a72c062a47701355c963d2 /progs/xdemos/pbinfo.c | |
parent | e3748eb19ba444f411ad66905dfddbe809225ca0 (diff) |
Use the GLX 1.3 pbuffer/fbconfig functions in preference to the SGIX ones.
Added more functions to pbutil.[ch] to better isolate API differences.
Diffstat (limited to 'progs/xdemos/pbinfo.c')
-rw-r--r-- | progs/xdemos/pbinfo.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/progs/xdemos/pbinfo.c b/progs/xdemos/pbinfo.c index 948ad9ca22c..d4bc7e80836 100644 --- a/progs/xdemos/pbinfo.c +++ b/progs/xdemos/pbinfo.c @@ -20,18 +20,18 @@ static void PrintConfigs(Display *dpy, int screen, Bool horizFormat) { - GLXFBConfigSGIX *fbConfigs; + FBCONFIG *fbConfigs; int nConfigs; int i; /* Note: you may want to tweek the attribute list to select a different * set of fbconfigs. */ int fbAttribs[] = { - GLX_RENDER_TYPE_SGIX, 0, - GLX_DRAWABLE_TYPE_SGIX, 0, + GLX_RENDER_TYPE, 0, + GLX_DRAWABLE_TYPE, 0, #if 0 - GLX_RENDER_TYPE_SGIX, GLX_RGBA_BIT_SGIX, - GLX_DRAWABLE_TYPE_SGIX, GLX_PIXMAP_BIT_SGIX, + GLX_RENDER_TYPE, GLX_RGBA_BIT, + GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, @@ -43,17 +43,9 @@ PrintConfigs(Display *dpy, int screen, Bool horizFormat) /* Get list of possible frame buffer configurations */ -#if 0 - /* SGIX method */ - fbConfigs = glXChooseFBConfigSGIX(dpy, screen, fbAttribs, &nConfigs); -#else - /* GLX 1.3 method */ - (void) fbAttribs; - fbConfigs = glXGetFBConfigs(dpy, screen, &nConfigs); -#endif - - if (nConfigs==0 || !fbConfigs) { - printf("Error: glxChooseFBConfigSGIX failed\n"); + fbConfigs = ChooseFBConfig(dpy, screen, fbAttribs, &nConfigs); + if (!nConfigs || !fbConfigs) { + printf("Error: glxChooseFBConfig failed\n"); return; } @@ -61,12 +53,12 @@ PrintConfigs(Display *dpy, int screen, Bool horizFormat) if (horizFormat) { printf(" ID VisualType Depth Lvl RGB CI DB Stereo R G B A"); - printf(" Z S AR AG AB AA MSbufs MSnum Pbuffer\n"); + printf(" Z S AR AG AB AA MSbufs MSnum Pbuffer Float\n"); } /* Print config info */ for (i=0;i<nConfigs;i++) { - PrintFBConfigInfo(dpy, fbConfigs[i], horizFormat); + PrintFBConfigInfo(dpy, screen, fbConfigs[i], horizFormat); } /* free the list */ |