summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-01-06 23:59:37 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-01-06 23:59:37 +0000
commit71fc6a3fc9177efa335e5c09867faf0bde6584a2 (patch)
tree6a4153ecb2c6320ef8a261ae1415aca0c12f2ad2
parent1f98ee90228aa56df207cdbd223bb4b8c0bb15d9 (diff)
New GetAllFBConfigs() function. Some FBConfigs weren't reported before.
-rw-r--r--progs/xdemos/pbinfo.c27
-rw-r--r--progs/xdemos/pbutil.h4
2 files changed, 8 insertions, 23 deletions
diff --git a/progs/xdemos/pbinfo.c b/progs/xdemos/pbinfo.c
index d4bc7e8083..94c6f5d195 100644
--- a/progs/xdemos/pbinfo.c
+++ b/progs/xdemos/pbinfo.c
@@ -23,29 +23,10 @@ PrintConfigs(Display *dpy, int screen, Bool horizFormat)
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, 0,
- GLX_DRAWABLE_TYPE, 0,
-#if 0
- GLX_RENDER_TYPE, GLX_RGBA_BIT,
- GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_DEPTH_SIZE, 1,
- GLX_DOUBLEBUFFER, 0,
- GLX_STENCIL_SIZE, 0,
-#endif
- None};
-
-
- /* Get list of possible frame buffer configurations */
- fbConfigs = ChooseFBConfig(dpy, screen, fbAttribs, &nConfigs);
+
+ fbConfigs = GetAllFBConfigs(dpy, screen, &nConfigs);
if (!nConfigs || !fbConfigs) {
- printf("Error: glxChooseFBConfig failed\n");
+ printf("Error: glxGetFBConfigs failed\n");
return;
}
@@ -57,7 +38,7 @@ PrintConfigs(Display *dpy, int screen, Bool horizFormat)
}
/* Print config info */
- for (i=0;i<nConfigs;i++) {
+ for (i = 0; i < nConfigs; i++) {
PrintFBConfigInfo(dpy, screen, fbConfigs[i], horizFormat);
}
diff --git a/progs/xdemos/pbutil.h b/progs/xdemos/pbutil.h
index 68ba8808c2..e877f20625 100644
--- a/progs/xdemos/pbutil.h
+++ b/progs/xdemos/pbutil.h
@@ -38,6 +38,10 @@ extern FBCONFIG *
ChooseFBConfig(Display *dpy, int screen, const int attribs[], int *nConfigs);
+extern FBCONFIG *
+GetAllFBConfigs(Display *dpy, int screen, int *nConfigs);
+
+
extern XVisualInfo *
GetVisualFromFBConfig(Display *dpy, int screen, FBCONFIG config);