not an easy answer to a not easy question I would say.
Anyway, the reason why 2 devices of the same "family" behave in different ways could depend on many factors.
First of all, they mount different GPUs (I am very sure you know already it so, sorry to state the obvious) which brings the following differences:
- Iphone 4 and Iphone 3GS mount the same GPU, the PowerVR SGX535
- IPAD 2 uses the PowerVR SGX543MP2
First of all, the latter is an evolution of the first with a much different throughput and a newer architecture.
This alone does not anyway explain everything, the reason why you notice much more calls to gleRunVertexSubmitARM could be explained to the OpenGL driver implementation performed by PowerVR on its GPUs, most probably the SGX535 GPU driver performs the operations you require over an hook on that function.
Last, but not least, performance wise, drawing with GL_LINES is most of the time very inefficient for several reasons:
- Does not perform any hidden geometry detection
- Does not perform any face culling
- Reading around (and about my own experience of 2-3 years ago), using GL_LINE_WIDTH or GL_LINE_SMOOTH causes the driver to perform a "software" render not using any HW acceleration. This depends on the GPU and its OpenGL driver implementation
- When a filled polygon is rendered, the driver can optimize the operations with "Hierarchical Depth Buffer", with GL_LINES it cannot (again, this depends a lot on the driver but this is a very common aspect)
- Some drivers translates your GL_LINES mesh in triangles at the moment of the rendering. This is something I cannot prove but a very common topic with past game engines developers friends.
I hope to have helped you in some way.
Ciao Maurizio