summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_triangle.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-01-28 04:25:56 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-01-28 04:25:56 +0000
commit6e1666437ea091ecc50ab2b56d87129318f641d2 (patch)
tree2ecf6d4bd87f0acd5ca3379654814273182106da /src/mesa/swrast/s_triangle.c
parent7956292a765910077f50352d7cd0174e1e66d26c (diff)
Still more texture/span simplification and clean-up.
Updated comments, fixed indentation, etc.
Diffstat (limited to 'src/mesa/swrast/s_triangle.c')
-rw-r--r--src/mesa/swrast/s_triangle.c43
1 files changed, 6 insertions, 37 deletions
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index ce0b127b51..ace64fcaf3 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.51 2002/01/28 03:42:28 brianp Exp $ */
+/* $Id: s_triangle.c,v 1.52 2002/01/28 04:25:56 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -85,8 +85,7 @@ static void flat_ci_triangle( GLcontext *ctx,
span.index = IntToFixed(v2->index); \
span.indexStep = 0;
-#define RENDER_SPAN( span ) \
- _mesa_write_index_span(ctx, &span, GL_POLYGON );
+#define RENDER_SPAN( span ) _mesa_write_index_span(ctx, &span, GL_POLYGON )
#include "s_tritemp.h"
}
@@ -105,8 +104,7 @@ static void smooth_ci_triangle( GLcontext *ctx,
#define INTERP_FOG 1
#define INTERP_INDEX 1
-#define RENDER_SPAN( span ) \
- _mesa_write_index_span(ctx, &span, GL_POLYGON);
+#define RENDER_SPAN( span ) _mesa_write_index_span(ctx, &span, GL_POLYGON)
#include "s_tritemp.h"
}
@@ -138,8 +136,7 @@ static void flat_rgba_triangle( GLcontext *ctx,
span.blueStep = 0; \
span.alphaStep = 0;
-#define RENDER_SPAN( span ) \
- _mesa_write_rgba_span(ctx, &span, GL_POLYGON );
+#define RENDER_SPAN( span ) _mesa_write_rgba_span(ctx, &span, GL_POLYGON )
#include "s_tritemp.h"
}
@@ -161,8 +158,8 @@ static void smooth_rgba_triangle( GLcontext *ctx,
#define INTERP_RGB 1
#define INTERP_ALPHA 1
-#define RENDER_SPAN( span ) \
- ASSERT(span.interpMask & SPAN_RGBA); \
+#define RENDER_SPAN( span ) \
+ ASSERT(span.interpMask & SPAN_RGBA); \
_mesa_write_rgba_span(ctx, &span, GL_POLYGON);
#include "s_tritemp.h"
@@ -926,13 +923,6 @@ static void general_textured_triangle( GLcontext *ctx,
#define INTERP_ALPHA 1
#define INTERP_TEX 1
-#define SETUP_CODE \
- const struct gl_texture_object *obj = ctx->Texture.Unit[0]._Current; \
- const struct gl_texture_image *texImage = obj->Image[obj->BaseLevel];\
- span.texWidth[0] = (GLfloat) texImage->Width; \
- span.texHeight[0] = (GLfloat) texImage->Height; \
- (void) fixedToDepthShift;
-
#define RENDER_SPAN( span ) _mesa_write_texture_span(ctx, &span, GL_POLYGON);
#include "s_tritemp.h"
@@ -961,13 +951,6 @@ static void lambda_textured_triangle( GLcontext *ctx,
#define INTERP_TEX 1
#define INTERP_LAMBDA 1
-#define SETUP_CODE \
- const struct gl_texture_object *obj = ctx->Texture.Unit[0]._Current; \
- const struct gl_texture_image *texImage = obj->Image[obj->BaseLevel];\
- span.texWidth[0] = (GLfloat) texImage->Width; \
- span.texHeight[0] = (GLfloat) texImage->Height; \
- (void) fixedToDepthShift;
-
#define RENDER_SPAN( span ) _mesa_write_texture_span(ctx, &span, GL_POLYGON);
#include "s_tritemp.h"
@@ -996,20 +979,6 @@ lambda_multitextured_triangle( GLcontext *ctx,
#define INTERP_MULTITEX 1
#define INTERP_LAMBDA 1
-#define SETUP_CODE \
- GLuint u; \
- for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { \
- if (ctx->Texture.Unit[u]._ReallyEnabled) { \
- const struct gl_texture_object *texObj; \
- const struct gl_texture_image *texImage; \
- texObj = ctx->Texture.Unit[u]._Current; \
- texImage = texObj->Image[texObj->BaseLevel]; \
- span.texWidth[u] = (GLfloat) texImage->Width; \
- span.texHeight[u] = (GLfloat) texImage->Height; \
- } \
- } \
- (void) fixedToDepthShift;
-
#define RENDER_SPAN( span ) _mesa_write_texture_span(ctx, &span, GL_POLYGON);
#include "s_tritemp.h"