summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-09-25 16:56:35 -0600
committerBrian <[email protected]>2007-09-25 16:56:35 -0600
commit0dfa5506a318b202ac955a59cc7c9b22b5ff3867 (patch)
tree81e5dd315975a4d1356b5293aba50d8d1875c295 /src/mesa/state_tracker
parentccff14de0d6291aa0866ce5d207af416caec69e7 (diff)
st_draw_vertices() no longer needs attribs[] array parameter
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c6
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c13
-rw-r--r--src/mesa/state_tracker/st_draw.c5
-rw-r--r--src/mesa/state_tracker/st_draw.h2
4 files changed, 6 insertions, 20 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 367ae06cf39..3a70d2f121e 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -223,10 +223,6 @@ draw_quad(GLcontext *ctx,
float x0, float y0, float x1, float y1, GLfloat z,
const GLfloat color[4])
{
- static const GLuint attribs[2] = {
- 0, /* pos */
- 3 /* color */
- };
GLfloat verts[4][2][4]; /* four verts, two attribs, XYZW */
GLuint i;
@@ -253,7 +249,7 @@ draw_quad(GLcontext *ctx,
verts[i][1][3] = color[3];
}
- st_draw_vertices(ctx, PIPE_PRIM_QUADS, 4, (float *) verts, 2, attribs);
+ st_draw_vertices(ctx, PIPE_PRIM_QUADS, 4, (float *) verts, 2);
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 49120a4dea4..9efd7188341 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -312,10 +312,6 @@ static void
draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
GLfloat x1, GLfloat y1)
{
- static const GLuint attribs[2] = {
- 0, /* pos */
- 8 /* tex0 */
- };
GLfloat verts[4][2][4]; /* four verts, two attribs, XYZW */
GLuint i;
@@ -351,7 +347,7 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
verts[i][1][3] = 1.0; /*Q*/
}
- st_draw_vertices(ctx, PIPE_PRIM_QUADS, 4, (float *) verts, 2, attribs);
+ st_draw_vertices(ctx, PIPE_PRIM_QUADS, 4, (float *) verts, 2);
}
@@ -359,11 +355,6 @@ static void
draw_quad_colored(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
GLfloat x1, GLfloat y1, const GLfloat *color)
{
- static const GLuint attribs[3] = {
- 0, /* pos */
- 1, /* color */
- 8 /* tex0 */
- };
GLfloat verts[4][3][4]; /* four verts, three attribs, XYZW */
GLuint i;
@@ -403,7 +394,7 @@ draw_quad_colored(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
verts[i][2][3] = 1.0; /*Q*/
}
- st_draw_vertices(ctx, PIPE_PRIM_QUADS, 4, (float *) verts, 3, attribs);
+ st_draw_vertices(ctx, PIPE_PRIM_QUADS, 4, (float *) verts, 3);
}
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 0f45bf579af..ce5bf0c8a94 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -316,7 +316,7 @@ st_draw_vbo(GLcontext *ctx,
void
st_draw_vertices(GLcontext *ctx, unsigned prim,
unsigned numVertex, float *verts,
- unsigned numAttribs, const unsigned attribs[])
+ unsigned numAttribs)
{
const float width = ctx->DrawBuffer->Width;
const float height = ctx->DrawBuffer->Height;
@@ -328,7 +328,6 @@ st_draw_vertices(GLcontext *ctx, unsigned prim,
unsigned i;
assert(numAttribs > 0);
- assert(attribs[0] == 0); /* position */
/* convert to clip coords */
for (i = 0; i < numVertex; i++) {
@@ -356,7 +355,7 @@ st_draw_vertices(GLcontext *ctx, unsigned prim,
velement.vertex_buffer_index = 0;
velement.src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
velement.dst_offset = 0;
- pipe->set_vertex_element(pipe, i/**attribs[i]**/, &velement);
+ pipe->set_vertex_element(pipe, i, &velement);
}
/* draw */
diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h
index 1fcd1b7e6b0..89ee790c577 100644
--- a/src/mesa/state_tracker/st_draw.h
+++ b/src/mesa/state_tracker/st_draw.h
@@ -62,7 +62,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
void
st_draw_vertices(GLcontext *ctx, unsigned prim,
unsigned numVertex, float *verts,
- unsigned numAttribs, const unsigned attribs[]);
+ unsigned numAttribs);
#endif