diff options
author | Eric Anholt <eric@anholt.net> | 2010-05-21 09:32:38 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-05-21 12:20:39 -0700 |
commit | 68fc4b415e322f6744299e39864fbc377c6eff74 (patch) | |
tree | 4bafffd8b0105174f3c5c0ae327a005be9145990 /progs/xdemos/pbinfo.c | |
parent | e4f4489e3fc0b36d72821b55794fb843b2b7fa5f (diff) |
Remove demos that have moved to git+ssh://git.freedesktop.org/git/mesa/demos.
The remaining programs are ones I've had difficulty finding a build
environment for to make the build system or are unit tests that should
probably live next to their code instead. Hopefully people can bring
over the build for remaining pieces they care about.
Diffstat (limited to 'progs/xdemos/pbinfo.c')
-rw-r--r-- | progs/xdemos/pbinfo.c | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/progs/xdemos/pbinfo.c b/progs/xdemos/pbinfo.c deleted file mode 100644 index edfa9c1f3b..0000000000 --- a/progs/xdemos/pbinfo.c +++ /dev/null @@ -1,107 +0,0 @@ - -/* - * 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 <X11/Xlib.h> -#include <stdio.h> -#include <string.h> -#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"); - XFree(fbConfigs); - 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 <display-name> 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<argc; i++) { - if (strcmp(argv[i],"-display")==0) { - if (i+1<argc) { - dpyName = argv[i+1]; - i++; - } - } - else if (strcmp(argv[i],"-t")==0) { - /* tabular format */ - horizFormat = True; - } - else if (strcmp(argv[i],"-v")==0) { - /* verbose format */ - horizFormat = False; - } - else if (strcmp(argv[i],"-help")==0) { - PrintUsage(); - return 0; - } - else { - printf("Unknown option: %s\n", argv[i]); - } - } - - dpy = XOpenDisplay(dpyName); - - if (!dpy) { - printf("Error: couldn't open display %s\n", XDisplayName(dpyName)); - return 1; - } - - scrn = DefaultScreen(dpy); - PrintConfigs(dpy, scrn, horizFormat); - XCloseDisplay(dpy); - return 0; -} |