summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-09-08 21:44:55 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-09-08 21:44:55 +0000
commit7f7b205259b228f81442f89e8318829737b08db6 (patch)
tree37fbd611954861ddf89bf7935e6bdaff8cb4d973 /src/mesa/drivers/x11
parent48c6a6ecd2b94d73317f1579193d98101566217a (diff)
removed ctx->Driver.Dither function
Diffstat (limited to 'src/mesa/drivers/x11')
-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 271cb13f08..f10684dcf7 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 );