summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/fakeglx.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-06-13 04:49:17 +0000
committerBrian Paul <[email protected]>2002-06-13 04:49:17 +0000
commitd09a1d8b29ae5841ae39b5c24c3f4693dd750559 (patch)
tree4f988f9357fdfbb2b0663861aad395168a4d7227 /src/mesa/drivers/x11/fakeglx.c
parent2f35d5e9d53165f6baf2d4a7fece3bb39d945323 (diff)
more removal of fprintf() calls
Diffstat (limited to 'src/mesa/drivers/x11/fakeglx.c')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 7df84b7cdb0..6c282a2a677 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1,4 +1,4 @@
-/* $Id: fakeglx.c,v 1.64 2002/05/27 17:06:59 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.65 2002/06/13 04:49:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -269,8 +269,7 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
ximageFlag = GL_TRUE;
}
else {
- fprintf(stderr, "Mesa: invalid value for MESA_BACK_BUFFER ");
- fprintf(stderr, "environment variable, using an XImage.\n");
+ _mesa_warning(NULL, "Mesa: invalid value for MESA_BACK_BUFFER environment variable, using an XImage.");
}
}
}
@@ -308,8 +307,8 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
/* Create a new visual and add it to the list. */
- if (NumVisuals>=MAX_VISUALS) {
- fprintf( stderr, "GLX Error: maximum number of visuals exceeded\n");
+ if (NumVisuals >= MAX_VISUALS) {
+ _mesa_problem(NULL, "GLX Error: maximum number of visuals exceeded");
return NULL;
}
@@ -392,7 +391,7 @@ create_glx_visual( Display *dpy, XVisualInfo *visinfo )
}
}
else {
- fprintf(stderr,"Mesa: error in glXCreateContext: bad visual\n");
+ _mesa_warning(NULL, "Mesa: error in glXCreateContext: bad visual\n");
return NULL;
}
}
@@ -578,8 +577,13 @@ static XVisualInfo *get_env_visual(Display *dpy, int scr, const char *varname)
}
}
- fprintf( stderr, "Mesa: GLX unable to find visual class=%s, depth=%d.\n",
- type, depth );
+ {
+ char s[1000];
+ sprintf(s, "Mesa: GLX unable to find visual class=%s, depth=%d.\n",
+ type, depth );
+ _mesa_warning(NULL, s);
+ }
+
return NULL;
}
@@ -1336,7 +1340,7 @@ Fake_glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap )
XMesaDestroyBuffer(b);
}
else if (getenv("MESA_DEBUG")) {
- fprintf( stderr, "Mesa: glXDestroyGLXPixmap: invalid pixmap\n");
+ _mesa_warning(NULL, "Mesa: glXDestroyGLXPixmap: invalid pixmap\n");
}
}
@@ -1408,7 +1412,7 @@ Fake_glXSwapBuffers( Display *dpy, GLXDrawable drawable )
XMesaSwapBuffers(buffer);
}
else if (getenv("MESA_DEBUG")) {
- fprintf(stderr, "Mesa Warning: glXSwapBuffers: invalid drawable\n");
+ _mesa_warning(NULL, "Mesa: glXSwapBuffers: invalid drawable\n");
}
}
@@ -1425,7 +1429,7 @@ Fake_glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
XMesaCopySubBuffer(buffer, x, y, width, height);
}
else if (getenv("MESA_DEBUG")) {
- fprintf(stderr, "Mesa Warning: glXCopySubBufferMESA: invalid drawable\n");
+ _mesa_warning(NULL, "Mesa: glXCopySubBufferMESA: invalid drawable\n");
}
}
@@ -1464,7 +1468,6 @@ Fake_glXGetConfig( Display *dpy, XVisualInfo *visinfo,
return 0;
}
else {
- /*fprintf( stderr, "Mesa: Error in glXGetConfig: bad visual\n");*/
return GLX_BAD_VISUAL;
}
}