summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11/xm_tri.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-11-14 17:40:13 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-11-14 17:40:13 +0000
commitc19d783e0715ac01ad4d3fd0705500d2bf6f7039 (patch)
tree68e28470e87358b225e07477a4900d79f8e47b0b /src/mesa/drivers/x11/xm_tri.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_tri.c')
-rw-r--r--src/mesa/drivers/x11/xm_tri.c46
1 files changed, 3 insertions, 43 deletions
diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c
index b152e5c8bb..a25d58092b 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<len;i++) { \
GLdepth z = FixedToDepth(ffz); \
if (z < zRow[i]) { \
@@ -595,7 +555,7 @@ static void flat_8R8G8B24_z_triangle( GLcontext *ctx,
#define INNER_LOOP( LEFT, RIGHT, Y ) \
{ \
GLint i, len = RIGHT-LEFT; \
- (void) fffog; \
+ (void) fffog; \
for (i=0;i<len;i++) { \
GLdepth z = FixedToDepth(ffz); \
if (z < zRow[i]) { \