summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxtris.c
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2003-10-29 14:40:43 +0000
committerDaniel Borca <[email protected]>2003-10-29 14:40:43 +0000
commit63a5ca08f3bdaee975c9b059caf15ffd3ddd8d38 (patch)
treeda2360538c52cd5b16a6edb60388d97026c30103 /src/mesa/drivers/glide/fxtris.c
parent40bd9d0b190e11d39350d1b08d2c2b28e3040bca (diff)
changes to accomodate texture compression
Diffstat (limited to 'src/mesa/drivers/glide/fxtris.c')
-rw-r--r--src/mesa/drivers/glide/fxtris.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index d60b8740270..08ecc6dd81b 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -530,6 +530,7 @@ static void init_rast_tab( void )
/* Accelerate vertex buffer rendering when renderindex == 0 and
* there is no clipping.
*/
+#define INIT(x) fxRenderPrimitive( ctx, x )
static void fx_render_vb_points( GLcontext *ctx,
GLuint start,
@@ -545,7 +546,7 @@ static void fx_render_vb_points( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_points\n");
}
- fxRenderPrimitive(ctx, GL_POINTS);
+ INIT(GL_POINTS);
/* Adjust point coords */
for (i = start; i < count; i++) {
@@ -576,7 +577,7 @@ static void fx_render_vb_line_strip( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_line_strip\n");
}
- fxRenderPrimitive(ctx, GL_LINE_STRIP);
+ INIT(GL_LINE_STRIP);
/* adjust line coords */
for (i = start; i < count; i++) {
@@ -609,7 +610,7 @@ static void fx_render_vb_line_loop( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_line_loop\n");
}
- fxRenderPrimitive(ctx, GL_LINE_LOOP);
+ INIT(GL_LINE_LOOP);
if (!(flags & PRIM_BEGIN)) {
j++;
@@ -649,7 +650,7 @@ static void fx_render_vb_lines( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_lines\n");
}
- fxRenderPrimitive(ctx, GL_LINES);
+ INIT(GL_LINES);
/* adjust line coords */
for (i = start; i < count; i++) {
@@ -680,7 +681,7 @@ static void fx_render_vb_triangles( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_triangles\n");
}
- fxRenderPrimitive(ctx, GL_TRIANGLES);
+ INIT(GL_TRIANGLES);
#if 0
/* [dBorca]
@@ -716,7 +717,7 @@ static void fx_render_vb_tri_strip( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_tri_strip\n");
}
- fxRenderPrimitive(ctx, GL_TRIANGLE_STRIP);
+ INIT(GL_TRIANGLE_STRIP);
if (flags & PRIM_PARITY)
mode = GR_TRIANGLE_STRIP_CONTINUE;
@@ -741,7 +742,7 @@ static void fx_render_vb_tri_fan( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_tri_fan\n");
}
- fxRenderPrimitive(ctx, GL_TRIANGLE_FAN);
+ INIT(GL_TRIANGLE_FAN);
grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, count-start,
fxVB + start, sizeof(GrVertex) );
@@ -761,7 +762,7 @@ static void fx_render_vb_quads( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_quads\n");
}
- fxRenderPrimitive(ctx, GL_QUADS);
+ INIT(GL_QUADS);
for (i = start ; i < count-3 ; i += 4 ) {
#define VERT(x) (fxVB + (x))
@@ -784,7 +785,7 @@ static void fx_render_vb_quad_strip( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_quad_strip\n");
}
- fxRenderPrimitive(ctx, GL_QUAD_STRIP);
+ INIT(GL_QUAD_STRIP);
count -= (count-start)&1;
@@ -805,7 +806,7 @@ static void fx_render_vb_poly( GLcontext *ctx,
fprintf(stderr, "fx_render_vb_poly\n");
}
- fxRenderPrimitive(ctx, GL_POLYGON);
+ INIT(GL_POLYGON);
grDrawVertexArrayContiguous( GR_POLYGON, count-start,
fxVB + start, sizeof(GrVertex));
@@ -836,6 +837,7 @@ static void (*fx_render_tab_verts[GL_POLYGON+2])(GLcontext *,
fx_render_vb_poly,
fx_render_vb_noop,
};
+#undef INIT(x)
/**********************************************************************/