summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-20 16:21:08 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-20 16:21:08 -0600
commit51da8ee85eccf0df3721cbd863cd174382d1ddfd (patch)
tree5fc9d29313fb9d8e1344434b6b0adf5116d277d5 /src/mesa/state_tracker/st_cb_drawpixels.c
parent0a262998ef2813d19e9fee01d3e5808416e9cb04 (diff)
Start to remove the temporary draw_vb() and draw_vertices() code.
new st_draw_vertices() utility used by glClear and glDrawPixels
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 11261f1d99..1aa56fcf8b 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -38,6 +38,7 @@
#include "st_program.h"
#include "st_cb_drawpixels.h"
#include "st_cb_texture.h"
+#include "st_draw.h"
#include "st_format.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -193,12 +194,12 @@ free_mipmap_tree(struct pipe_context *pipe, struct pipe_mipmap_tree *mt)
* Y=0=top
*/
static void
-draw_quad(struct st_context *st, GLfloat x0, GLfloat y0, GLfloat z,
+draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
GLfloat x1, GLfloat y1)
{
static const GLuint attribs[2] = {
- VF_ATTRIB_POS,
- VF_ATTRIB_TEX0
+ 0, /* pos */
+ 8 /* tex0 */
};
GLfloat verts[4][2][4]; /* four verts, two attribs, XYZW */
GLuint i;
@@ -235,8 +236,7 @@ draw_quad(struct st_context *st, GLfloat x0, GLfloat y0, GLfloat z,
verts[i][1][3] = 1.0; /*Q*/
}
- st->pipe->draw_vertices(st->pipe, PIPE_PRIM_QUADS,
- 4, (GLfloat *) verts, 2, attribs);
+ st_draw_vertices(ctx, PIPE_PRIM_QUADS, 4, (GLfloat *) verts, 2, attribs);
}
@@ -310,7 +310,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
y1 = ctx->DrawBuffer->Height - 1 - (y + height * ctx->Pixel.ZoomY);
/* draw textured quad */
- draw_quad(ctx->st, x0, y0, z, x1, y1);
+ draw_quad(ctx, x0, y0, z, x1, y1);
/* restore GL state */
pipe->set_setup_state(pipe, &ctx->st->state.setup);