aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-11-14 17:40:13 +0000
committerBrian Paul <[email protected]>2000-11-14 17:40:13 +0000
commitc19d783e0715ac01ad4d3fd0705500d2bf6f7039 (patch)
tree68e28470e87358b225e07477a4900d79f8e47b0b /src/mesa/drivers/x11/xm_dd.c
parent1e1aac034c986a08248861363c0baa27dc2ae2d5 (diff)
Removed Driver.Color() and Driver.Index() functions.
Pass color or color index directly to WriteMono*() span functions. Updated current s/w drivers accordingly. Clean-up of X gc handling in XMesa driver.
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 179178e2581..81700b5a52f 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.4 2000/11/13 20:02:57 keithw Exp $ */
+/* $Id: xm_dd.c,v 1.5 2000/11/14 17:40:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -245,33 +245,6 @@ clear_color( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a )
-/* Set current color index */
-static void
-set_index( GLcontext *ctx, GLuint index )
-{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
- unsigned long p = (unsigned long) index;
- xmesa->pixel = p;
- XMesaSetForeground( xmesa->display, xmesa->xm_buffer->gc1, p );
-}
-
-
-
-/* Set current drawing color */
-static void
-set_color( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a )
-{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
- xmesa->red = r;
- xmesa->green = g;
- xmesa->blue = b;
- xmesa->alpha = a;
- xmesa->pixel = xmesa_color_to_pixel( xmesa, r, g, b, a, xmesa->pixelformat );;
- XMesaSetForeground( xmesa->display, xmesa->xm_buffer->gc1, xmesa->pixel );
-}
-
-
-
/* Set index mask ala glIndexMask */
static void
index_mask( GLcontext *ctx, GLuint mask )
@@ -807,7 +780,7 @@ drawpixels_8R8G8B( GLcontext *ctx,
const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
- XMesaGC gc = xmesa->xm_buffer->gc1;
+ XMesaGC gc = xmesa->xm_buffer->gc;
assert(dpy);
assert(buffer);
assert(gc);
@@ -952,8 +925,6 @@ void xmesa_init_pointers( GLcontext *ctx )
ctx->Driver.SetDrawBuffer = set_draw_buffer;
ctx->Driver.SetReadBuffer = set_read_buffer;
- ctx->Driver.Index = set_index;
- ctx->Driver.Color = set_color;
ctx->Driver.ClearIndex = clear_index;
ctx->Driver.ClearColor = clear_color;
ctx->Driver.Clear = clear_buffers;