3 * Print list of fbconfigs and test each to see if a pbuffer can be created
8 * Updated on 5 October 2002.
21 PrintConfigs(Display
*dpy
, int screen
, Bool horizFormat
)
27 fbConfigs
= GetAllFBConfigs(dpy
, screen
, &nConfigs
);
28 if (!nConfigs
|| !fbConfigs
) {
29 printf("Error: glxGetFBConfigs failed\n");
34 printf("Number of fbconfigs: %d\n", nConfigs
);
37 printf(" ID VisualType Depth Lvl RGB CI DB Stereo R G B A");
38 printf(" Z S AR AG AB AA MSbufs MSnum Pbuffer Float\n");
41 /* Print config info */
42 for (i
= 0; i
< nConfigs
; i
++) {
43 PrintFBConfigInfo(dpy
, screen
, fbConfigs
[i
], horizFormat
);
56 printf(" -display <display-name> specify X display name\n");
57 printf(" -t print in tabular format\n");
58 printf(" -v print in verbose format\n");
59 printf(" -help print this information\n");
64 main(int argc
, char *argv
[])
69 Bool horizFormat
= True
;
72 for (i
=1; i
<argc
; i
++) {
73 if (strcmp(argv
[i
],"-display")==0) {
79 else if (strcmp(argv
[i
],"-t")==0) {
83 else if (strcmp(argv
[i
],"-v")==0) {
87 else if (strcmp(argv
[i
],"-help")==0) {
92 printf("Unknown option: %s\n", argv
[i
]);
96 dpy
= XOpenDisplay(dpyName
);
99 printf("Error: couldn't open display %s\n", XDisplayName(dpyName
));
103 scrn
= DefaultScreen(dpy
);
104 PrintConfigs(dpy
, scrn
, horizFormat
);