}
}
+ memset(&vbuf, 0, sizeof vbuf);
+
vbuf.stride = sizeof( struct vertex );
vbuf.buffer_offset = 0;
vbuf.buffer = pipe_buffer_create_with_data(ctx,
sizeof(vertices),
vertices);
- ctx->set_vertex_buffers(ctx, 1, &vbuf);
+ ctx->set_vertex_buffers(ctx, 0, 1, &vbuf);
}
static void set_vertex_shader( void )
ctx->clear(ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_POINTS, 0, Elements(vertices));
- ctx->flush(ctx, NULL);
+ ctx->flush(ctx, NULL, 0);
graw_save_surface_to_file(ctx, surf, NULL);
exit(4);
surf_tmpl.format = templat.format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;