mesa: disable visual warning unless LIBGL_DEBUG is defined
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 6 Jun 2008 21:41:41 +0000 (15:41 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 6 Jun 2008 21:52:47 +0000 (15:52 -0600)
src/glx/x11/glxext.c

index 2852217ba397daa66393b2feb3cf9f0f25bfa87f..6403cbd56df9680b3be48e73a46f6efb0d749360 100644 (file)
@@ -671,8 +671,10 @@ filter_modes( __GLcontextModes ** server_modes,
        if ( do_delete && (m->visualID != 0) ) {
            do_delete = GL_FALSE;
 
-           fprintf(stderr, "libGL warning: 3D driver claims to not support "
-                   "visual 0x%02x\n", m->visualID);
+            if (getenv("LIBGL_DEBUG")) {
+               fprintf(stderr, "libGL warning: 3D driver claims to not support "
+                       "visual 0x%02x\n", m->visualID);
+            }
        }
 
        if ( do_delete ) {