/* * Print list of fbconfigs and test each to see if a pbuffer can be created * for that config. * * Brian Paul * April 1997 * Updated on 5 October 2002. */ #include #include #include #include "pbutil.h" static void PrintConfigs(Display *dpy, int screen, Bool horizFormat) { FBCONFIG *fbConfigs; int nConfigs; int i; fbConfigs = GetAllFBConfigs(dpy, screen, &nConfigs); if (!nConfigs || !fbConfigs) { printf("Error: glxGetFBConfigs failed\n"); return; } printf("Number of fbconfigs: %d\n", nConfigs); 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 Float\n"); } /* Print config info */ for (i = 0; i < nConfigs; i++) { PrintFBConfigInfo(dpy, screen, fbConfigs[i], horizFormat); } /* free the list */ XFree(fbConfigs); } static void PrintUsage(void) { printf("Options:\n"); printf(" -display specify X display name\n"); printf(" -t print in tabular format\n"); printf(" -v print in verbose format\n"); printf(" -help print this information\n"); } int main(int argc, char *argv[]) { Display *dpy; int scrn; char *dpyName = NULL; Bool horizFormat = True; int i; for (i=1; i