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_tri.c | 46 +++---------------------------------------- 1 file changed, 3 insertions(+), 43 deletions(-) (limited to 'src/mesa/drivers/x11/xm_tri.c') diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c index b152e5c8bbc..a25d58092b8 100644 --- a/src/mesa/drivers/x11/xm_tri.c +++ b/src/mesa/drivers/x11/xm_tri.c @@ -1,4 +1,4 @@ -/* $Id: xm_tri.c,v 1.8 2000/11/06 17:28:20 brianp Exp $ */ +/* $Id: xm_tri.c,v 1.9 2000/11/14 17:40:15 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -53,46 +53,6 @@ /**********************************************************************/ -#if 0 -/* - * Render a triangle into a pixmap, any pixel format, flat shaded and - * no raster ops. - */ -static void flat_pixmap_triangle( GLcontext *ctx, - SWvertex *v0, - SWvertex *v1, - SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaPoint p[3]; - XMesaGC gc; - - { - unsigned long pixel; - if (xmesa->xm_visual->gl_visual->RGBAflag) { - pixel = xmesa_color_to_pixel( xmesa, - v0->color[0], v0->color[1], - v0->color[2], v0->color[3], - xmesa->pixelformat ); - } - else { - pixel = v0->index; - } - gc = xmesa->xm_buffer->gc2; - XMesaSetForeground( xmesa->display, gc, pixel ); - } - p[0].x = (GLint) (v0->win[0] + 0.5f); - p[0].y = FLIP( xmesa->xm_buffer, (GLint) (v0->win[1] - 0.5f) ); - p[1].x = (GLint) (v1->win[0] + 0.5f); - p[1].y = FLIP( xmesa->xm_buffer, (GLint) (v1->win[1] - 0.5f) ); - p[2].x = (GLint) (v2->win[0] + 0.5f); - p[2].y = FLIP( xmesa->xm_buffer, (GLint) (v2->win[1] - 0.5f) ); - XMesaFillPolygon( xmesa->display, xmesa->xm_buffer->buffer, gc, - p, 3, Convex, CoordModeOrigin ); -} -#endif - - /* * XImage, smooth, depth-buffered, PF_TRUECOLOR triangle. */ @@ -563,7 +523,7 @@ static void flat_8R8G8B_z_triangle( GLcontext *ctx, #define INNER_LOOP( LEFT, RIGHT, Y ) \ { \ GLint i, len = RIGHT-LEFT; \ - (void) fffog; \ + (void) fffog; \ for (i=0;i