assert(0);
}
- vbuf->render->draw(vbuf->render, vbuf->indices, vbuf->nr_indices);
-
+ vbuf->render->draw( vbuf->render,
+ vbuf->prim,
+ vbuf->indices,
+ vbuf->nr_indices,
+ vbuf->vertices,
+ vbuf->nr_vertices,
+ vbuf->vertex_size );
+
vbuf->nr_indices = 0;
}
{
struct vbuf_stage *vbuf = vbuf_stage( stage );
- FREE( vbuf->indices );
+ align_free( vbuf->indices );
FREE( stage );
}
assert(render->max_indices < UNDEFINED_VERTEX_ID);
vbuf->max_indices = render->max_indices;
- vbuf->indices = MALLOC( vbuf->max_indices );
+ vbuf->indices = align_malloc( vbuf->max_indices, 16 );
vbuf->vertices = NULL;
vbuf->vertex_ptr = vbuf->vertices;
* DrawElements, note indices are ushort:
*/
void (*draw)( struct vbuf_render *,
+ uint prim,
const ushort *indices,
- unsigned nr_indices );
+ uint nr_indices,
+ const void *vertices,
+ uint nr_vertices,
+ uint vertex_bytes);
/**
* Called when vbuf is done with this set of vertices:
static void
i915_vbuf_render_draw( struct vbuf_render *render,
+ uint prim,
const ushort *indices,
- unsigned nr_indices )
+ uint nr_indices,
+ const void *vertices,
+ uint nr_vertices,
+ uint vertex_bytes)
{
struct i915_vbuf_render *i915_render = i915_vbuf_render(render);
struct i915_context *i915 = i915_render->i915;