glDrawElementsInstanced vs glDrawElements

Hi,

Working on a rendering concept, I was wondering if it makes sense to only use glDrawElementsInstanced for all the types of rendering (multiple isntances or just one)

what I mean is, normaly the glDrawElementsInstanced is used to render a set of elements that share the same mesh, and glDrawElements to render isolated elements that either differ in mesh and/or in material.

My ideia is, if I only use glDrawElementsInstanced to render everything, even when rendering only 1 element by passing count = 1, so:

doing glDrawElementsInstanced with count = 1 is it the same as glDrawElementsInstanced, or will it have a poor performance as when doing the latter? And if not, is it a bad practice?

Regards,
Jakes

glDrawElements is equivalent to glDrawElementsInstanced with the instancecount parameter equal to 1. It’s highly unlikely that there would be any performance difference.

Worth noting that in Vulkan every draw call is an instanced draw call; there is no equivalent to glDrawElements. So that at least should indicate that at a layer closer to the hardware they are indeed equivalent.