Currently, I'm profiling my iOS. All the calls to glDrawArrays are expensive. For example, here is a screenshot of the rendering part of a particle system:
As you can see, the
glDrawArrays call takes from that method 39% of the CPU time. While other calls like
glBindVertexArrayOES are very quick. Why isn't
glDrawArrays as quick as the others are? Aren't all these methods starting with
gl*** short functions that will add a command to the driver queue? So, why does it take longer for a
glDrawArrays call to be added to the queue, in comparation with all the other gl calls?
Is this normal, or does this mean that I'm doing something wrong?
In response to doug: Nope, that didn't work. The glFinish() call actually took a while, but the
glDrawArrays call is still taking much time in comparation with the state changes (like