summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 271cb13f083..f10684dcf7a 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -1,4 +1,4 @@
-/* $Id: xm_dd.c,v 1.1 2000/09/07 15:40:30 brianp Exp $ */
+/* $Id: xm_dd.c,v 1.2 2000/09/08 21:44:57 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -349,22 +349,6 @@ color_mask(GLcontext *ctx,
}
-/*
- * Enable/disable dithering
- */
-static void
-dither( GLcontext *ctx, GLboolean enable )
-{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
- if (enable) {
- xmesa->pixelformat = xmesa->xm_visual->dithered_pf;
- }
- else {
- xmesa->pixelformat = xmesa->xm_visual->undithered_pf;
- }
-}
-
-
/**********************************************************************/
/*** glClear implementations ***/
@@ -920,6 +904,25 @@ get_string( GLcontext *ctx, GLenum name )
}
+static void
+enable( GLcontext *ctx, GLenum pname, GLboolean state )
+{
+ const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+
+ switch (pname) {
+ case GL_DITHER:
+ if (state)
+ xmesa->pixelformat = xmesa->xm_visual->dithered_pf;
+ else
+ xmesa->pixelformat = xmesa->xm_visual->undithered_pf;
+ break;
+ default:
+ ; /* silence compiler warning */
+ }
+}
+
+
+
/*
* Initialize all the DD.* function pointers depending on the color
* buffer configuration. This is mainly called by XMesaMakeCurrent.
@@ -957,7 +960,7 @@ xmesa_update_state( GLcontext *ctx )
ctx->Driver.Clear = clear_buffers;
ctx->Driver.IndexMask = index_mask;
ctx->Driver.ColorMask = color_mask;
- ctx->Driver.Dither = dither;
+ ctx->Driver.Enable = enable;
ctx->Driver.PointsFunc = xmesa_get_points_func( ctx );
ctx->Driver.LineFunc = xmesa_get_line_func( ctx );