renderer: use DrawElementsInstancedBaseVertex for instance + bias

Fixes: arb_draw_elements_base_vertex-drawelements-instanced
macos/master
Dave Airlie 10 years ago
parent e416e18569
commit 68a9193e04
  1. 4
      src/vrend_renderer.c

@ -2408,7 +2408,9 @@ void vrend_draw_vbo(struct vrend_context *ctx,
}
if (info->index_bias) {
if (info->min_index != 0 || info->max_index != -1)
if (info->instance_count > 1)
glDrawElementsInstancedBaseVertex(mode, info->count, elsz, (void *)(unsigned long)ctx->sub->ib.offset, info->instance_count, info->index_bias);
else if (info->min_index != 0 || info->max_index != -1)
glDrawRangeElementsBaseVertex(mode, info->min_index, info->max_index, info->count, elsz, (void *)(unsigned long)ctx->sub->ib.offset, info->index_bias);
else
glDrawElementsBaseVertex(mode, info->count, elsz, (void *)(unsigned long)ctx->sub->ib.offset, info->index_bias);

Loading…
Cancel
Save