Is glDrawArraysInstanced
in OpenGL parallel when drawing those instances?
I cannot figure out by referring to its reference and numerous online tutorials.
[Update] To be more clear, I mean, for example, we have 100 instances. Are the drawing of those 100 instances parallel? For example, we have the 100 commands "glDrawArrays(mode, first, count);"? Is execution of those 100 commands sequential or parallel?
I think it should be sequential. GPU begins to draw the second instance, only AFTER the first instance drawing finished.
Or glDrawArraysInstanced
just save the time for "giving your GPU the commands"?
[Update 2] The reason I wanted to know the answer, is that: If it is sequential, personally I think drawing thousands of tree leaves in this way is time consuming. I may draw them in one shader program with some algorithm tweak.
glDrawInstanced*()
call. Why do you need to know, anyway? The point is, it's very, very fast indeed. Fast enough that you may as well consider it the same as any otherglDraw*()
operation... also atomic. \$\endgroup\$