Sign in to follow this  
noshel

[Android] VA vs VBO performance test

Recommended Posts

Hi all,


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)


100 Squares:

[img]http://img703.imageshack.us/img703/3277/100quadseng.jpg[/img]


400 squares:

[img]http://img560.imageshack.us/img560/9423/400quadseng.jpg[/img]



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.

Thanks in advance!


Regards

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this