From c19d783e0715ac01ad4d3fd0705500d2bf6f7039 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 14 Nov 2000 17:40:13 +0000 Subject: 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. --- src/mesa/drivers/x11/xm_line.c | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) (limited to 'src/mesa/drivers/x11/xm_line.c') diff --git a/src/mesa/drivers/x11/xm_line.c b/src/mesa/drivers/x11/xm_line.c index 4c09187add..9b5386caa6 100644 --- a/src/mesa/drivers/x11/xm_line.c +++ b/src/mesa/drivers/x11/xm_line.c @@ -1,4 +1,4 @@ -/* $Id: xm_line.c,v 1.8 2000/11/06 17:28:20 brianp Exp $ */ +/* $Id: xm_line.c,v 1.9 2000/11/14 17:40:15 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -60,7 +60,7 @@ static void draw_points_ANY_pixmap( GLcontext *ctx, SWvertex *vert ) XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc2; + XMesaGC gc = xmesa->xm_buffer->gc; if (xmesa->xm_visual->gl_visual->RGBAflag) { register int x, y; @@ -114,38 +114,6 @@ void xmesa_choose_point( GLcontext *ctx ) /**********************************************************************/ -#if 0 -/* - * Render a line into a pixmap, any pixel format. - */ -static void flat_pixmap_line( GLcontext *ctx, - SWvertex *vert0, SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register int x0, y0, x1, y1; - XMesaGC gc; - unsigned long pixel; - if (xmesa->xm_visual->gl_visual->RGBAflag) { - const GLubyte *color = vert0->color; - pixel = xmesa_color_to_pixel( xmesa, color[0], color[1], color[2], color[3], - xmesa->pixelformat ); - } - else { - pixel = vert0->index; - } - gc = xmesa->xm_buffer->gc2; - XMesaSetForeground( xmesa->display, gc, pixel ); - - x0 = (GLint) vert0->win[0]; - y0 = FLIP( xmesa->xm_buffer, (GLint) vert0->win[1] ); - x1 = (GLint) vert1->win[0]; - y1 = FLIP( xmesa->xm_buffer, (GLint) vert1->win[1] ); - XMesaDrawLine( xmesa->display, xmesa->xm_buffer->buffer, gc, - x0, y0, x1, y1 ); -} -#endif - - /* * Draw a flat-shaded, PF_TRUECOLOR line into an XImage. */ -- cgit v1.2.3