summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_triangle.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/swrast/s_triangle.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/swrast/s_triangle.c')
-rw-r--r--src/mesa/swrast/s_triangle.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 8ca640610e..b71da4f648 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -1,4 +1,4 @@
-/* $Id: s_triangle.c,v 1.3 2000/11/13 20:02:57 keithw Exp $ */
+/* $Id: s_triangle.c,v 1.4 2000/11/14 17:40:16 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -74,12 +74,7 @@ static void flat_ci_triangle( GLcontext *ctx,
SWvertex *v2 )
{
#define INTERP_Z 1
-#define SETUP_CODE \
- GLuint index = v0->index; \
- if (1) { \
- /* set the color index */ \
- (*ctx->Driver.Index)( ctx, index ); \
- }
+#define SETUP_CODE
#define INNER_LOOP( LEFT, RIGHT, Y ) \
{ \
@@ -95,7 +90,7 @@ static void flat_ci_triangle( GLcontext *ctx,
fffog += fdfogdx; \
} \
gl_write_monoindex_span( ctx, n, LEFT, Y, zspan, \
- fogspan, index, GL_POLYGON ); \
+ fogspan, v0->index, GL_POLYGON ); \
} \
}
@@ -152,15 +147,7 @@ static void flat_rgba_triangle( GLcontext *ctx,
#define INTERP_Z 1
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
-#define SETUP_CODE \
- if (1) { \
- /* set the color */ \
- GLchan r = v0->color[0]; \
- GLchan g = v0->color[1]; \
- GLchan b = v0->color[2]; \
- GLchan a = v0->color[3]; \
- (*ctx->Driver.Color)( ctx, r, g, b, a ); \
- }
+#define SETUP_CODE
#define INNER_LOOP( LEFT, RIGHT, Y ) \
{ \
@@ -176,8 +163,7 @@ static void flat_rgba_triangle( GLcontext *ctx,
fffog += fdfogdx; \
} \
gl_write_monocolor_span( ctx, n, LEFT, Y, zspan, \
- fogspan, \
- v0->color, \
+ fogspan, v0->color, \
GL_POLYGON ); \
} \
}