handle = info.ctx->create_vertex_elements_state(info.ctx, 2, ve);
info.ctx->bind_vertex_elements_state(info.ctx, handle);
+ memset(&vbuf, 0, sizeof vbuf);
vbuf.stride = sizeof(struct vertex);
vbuf.buffer_offset = 0;
- vbuf.buffer = info.screen->user_buffer_create(info.screen,
- vertices,
- sizeof(vertices),
- PIPE_BIND_VERTEX_BUFFER);
+ vbuf.buffer = pipe_buffer_create_with_data(info.ctx,
+ PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_DEFAULT,
+ sizeof(vertices),
+ vertices);
- info.ctx->set_vertex_buffers(info.ctx, 1, &vbuf);
+ info.ctx->set_vertex_buffers(info.ctx, 0, 1, &vbuf);
}
PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL,
&clear_color, 1.0, 0);
util_draw_arrays(info.ctx, PIPE_PRIM_QUADS, 0, NUM_VERTS);
- info.ctx->flush(info.ctx, NULL);
+ info.ctx->flush(info.ctx, NULL, 0);
#if 0
/* At the moment, libgraw leaks out/makes available some of the