mesa: added new linux-gallium and linux-gallium-debug configs
[mesa.git] / progs / xdemos / glxinfo.c
index db7d1ed08e72e539fab33b4df55b2a6c6e5fd2eb..445d3ea94b6d851d9a7de65a17242c039155cbb1 100644 (file)
@@ -447,7 +447,6 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
    if (!ctx) {
       fprintf(stderr, "Error: glXCreateContext failed\n");
       XFree(visinfo);
-      XDestroyWindow(dpy, win);
       return;
    }
 
@@ -523,6 +522,13 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
       printf("OpenGL vendor string: %s\n", glVendor);
       printf("OpenGL renderer string: %s\n", glRenderer);
       printf("OpenGL version string: %s\n", glVersion);
+#ifdef GL_VERSION_2_0
+      if (glVersion[0] >= '2' && glVersion[1] == '.') {
+         char *v = (char *) glGetString(GL_SHADING_LANGUAGE_VERSION);
+         printf("OpenGL shading language version string: %s\n", v);
+      }
+#endif
+
       printf("OpenGL extensions:\n");
       print_extension_list(glExtensions);
       if (limits)
@@ -657,7 +663,7 @@ get_visual_attribs(Display *dpy, XVisualInfo *vInfo,
 
    /* multisample attribs */
 #ifdef GLX_ARB_multisample
-   if (ext && strstr(ext, "GLX_ARB_multisample") == 0) {
+   if (ext && strstr(ext, "GLX_ARB_multisample")) {
       glXGetConfig(dpy, vInfo, GLX_SAMPLE_BUFFERS_ARB, &attribs->numMultisample);
       glXGetConfig(dpy, vInfo, GLX_SAMPLES_ARB, &attribs->numSamples);
    }