I don't understand what I'm suppose to put as the Intbuffer or Int[]
glMultiDrawArrays(int mode, int[] first, int first_offset, int[] count, int count_offset, int primcount)
glMultiDrawArrays(int mode, IntBuffer first, IntBuffer count, int primcount)
I understand the other pieces from DrawArrays, and I get the primcount. What is first and count looking for here? Can someone give an short example?
I don't advise you to use glMultiDrawArrays because some implementations are buggy, lots of them only perform a loop and it rarely gives any performance boost:
The effect of glMultiDrawArrays() is the same as
for (i = 0; i < primcount; i++) {
if (count[i] > 0)
glDrawArrays(mode, first[i], count[i]);
}
No it is not worse than using glDrawArrays but it may cause crash with some bad drivers, that is why I don't advise you to use it, I removed any call of this method from the source code of my first person shooter.