wined3d: Check for support before calling glDrawElementsInstancedBaseVertex.

This commit is contained in:
Stefan Dösinger 2013-11-04 12:38:33 +01:00 committed by Alexandre Julliard
parent ec1a57f25b
commit 84a1e60e48
1 changed files with 12 additions and 3 deletions

View File

@ -52,10 +52,19 @@ static void drawStridedFast(const struct wined3d_gl_info *gl_info, GLenum primit
{
if (start_instance)
FIXME("Start instance (%u) not supported.\n", start_instance);
if (gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX])
{
GL_EXTCALL(glDrawElementsInstancedBaseVertex(primitive_type, count, idxtype,
(const char *)idx_data + (idx_size * start_idx), instance_count, base_vertex_index));
checkGLcall("glDrawElementsInstancedBaseVertex");
}
else
{
GL_EXTCALL(glDrawElementsInstancedARB(primitive_type, count, idxtype,
(const char *)idx_data + (idx_size * start_idx), instance_count));
checkGLcall("glDrawElementsInstancedARB");
}
}
}
else if (gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX])
{