summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-12-04 03:19:46 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-12-04 03:19:46 +0000
commitb305028464f02947c0cce0476af0e35f4ed1fafa (patch)
tree6623fb86dea2eb572743c161055e37a1d43c995d /src/mesa/drivers/x11
parent03e29a5f77c13b7b888bd8443cb2752850e47d6a (diff)
Port over changes from XFree86/Mesa 5.0.2, mostly to silence compiler warnings.
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c10
-rw-r--r--src/mesa/drivers/x11/xm_api.c2
-rw-r--r--src/mesa/drivers/x11/xm_dd.c6
3 files changed, 16 insertions, 2 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 84a5f5c84c..1bab6d91a4 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1100,6 +1100,8 @@ static XMesaVisual choose_visual( Display *dpy, int screen, const int *list )
}
}
+ (void) caveat;
+
/*
* Since we're only simulating the GLX extension this function will never
* find any real GL visuals. Instead, all we can do is try to find an RGB
@@ -2019,6 +2021,10 @@ Fake_glXCreatePbuffer( Display *dpy, GLXFBConfig config,
}
}
+ /* not used at this time */
+ (void) useLargest;
+ (void) preserveContents;
+
if (width == 0 || height == 0)
return 0;
@@ -2373,6 +2379,10 @@ Fake_glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config,
}
}
+ /* not used at this time */
+ (void) useLargest;
+ (void) preserveContents;
+
xmbuf = XMesaCreatePBuffer( xmvis, 0, width, height);
/* A GLXPbuffer handle must be an X Drawable because that's what
* glXMakeCurrent takes.
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index d800de97d5..02c67c25cf 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -881,6 +881,8 @@ static GLboolean setup_grayscale( int client, XMesaVisual v,
static GLboolean setup_dithered_color( int client, XMesaVisual v,
XMesaBuffer buffer, XMesaColormap cmap )
{
+ (void) DitherValues; /* silence warning */
+
if (GET_VISUAL_DEPTH(v)<4 || GET_VISUAL_DEPTH(v)>16) {
return GL_FALSE;
}
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index d82edda774..7d896c5d58 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -137,8 +137,8 @@ set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit )
else if (bufferBit == BACK_LEFT_BIT) {
ASSERT(target->db_state);
if (target->backpixmap) {
- /* back buffer is a pixmape */
- target->buffer = target->backpixmap; /* incompatible types? */
+ /* back buffer is a pixmap */
+ target->buffer = (XMesaDrawable) target->backpixmap;
}
else if (target->backimage) {
/* back buffer is an XImage */
@@ -413,6 +413,7 @@ clear_24bit_ximage( GLcontext *ctx, GLboolean all,
const GLubyte r = xmesa->clearcolor[0];
const GLubyte g = xmesa->clearcolor[1];
const GLubyte b = xmesa->clearcolor[2];
+#if 0 /* See below */
register GLuint clearPixel;
if (xmesa->swapbytes) {
clearPixel = (b << 16) | (g << 8) | r;
@@ -420,6 +421,7 @@ clear_24bit_ximage( GLcontext *ctx, GLboolean all,
else {
clearPixel = (r << 16) | (g << 8) | b;
}
+#endif
if (all) {
if (r==g && g==b) {