wined3d: Check for support before calling glDrawElementsInstancedBaseVertex.
This commit is contained in:
parent
ec1a57f25b
commit
84a1e60e48
|
@ -52,10 +52,19 @@ static void drawStridedFast(const struct wined3d_gl_info *gl_info, GLenum primit
|
||||||
{
|
{
|
||||||
if (start_instance)
|
if (start_instance)
|
||||||
FIXME("Start instance (%u) not supported.\n", 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,
|
GL_EXTCALL(glDrawElementsInstancedBaseVertex(primitive_type, count, idxtype,
|
||||||
(const char *)idx_data + (idx_size * start_idx), instance_count, base_vertex_index));
|
(const char *)idx_data + (idx_size * start_idx), instance_count, base_vertex_index));
|
||||||
checkGLcall("glDrawElementsInstancedBaseVertex");
|
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])
|
else if (gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue