im implementing a basic 2D engine for Android, just for my own use, in order to be able to reuse the base-code between my game developments. Im neraly new on OpenGL ES 2.0, so i have some doubts about what is better to render, Vertex Arrays or Vertex Buffer Objects. Ive read some (here and other webs) about it, that VBO for static objects, so you dont have to resend data to GPU every time, and for constantly moving objects youll find better performance on Vertex Arrays.
Better than believing or not, i decided to benchmark both, so here are the results for 100 squares & 400 squares rendered on screen. VA wins the test, even on static render. i can post the code i want to see it. (mseg means miliseconds, im spanish and forgot to put that in english)
Is this performance what i have to expect? I heard that dedicated memory on cellphones for VBO its the RAM, so i wont get that boost on performance.
VBOs really lose their advantage for something as simple as squares. If you're talking about 50,000 vertex polygon meshes I think you will find quite a different result.
Their advantage is in not having to stream geometry to the graphics processor each frame. With a square there is little geometry to be sent, and the advantage of saving the 48 or so bytes per square is probably lost in the overhead of all the draw calls.
Also I'm not positive, but I'm not sure on mobile if the GPU has its own dedicated memory or not, or if it just shares the system ram. If it shares the main memory it probably doesn't help that much, because for both VA and VBO you're getting the data from the same place. On a desktop system where VBOs are stored in local graphic memory that really gives them their speedup. Not sure if that still applies to mobile.