So now that I have my spritebacher working like a charm. ;D I wanted to put it up against libgdx’s sprite batcher and see if it is worth anything.
My spritebatcher simply uses vertex arrays and not VBO where I think libgdx uses VBO. I also am not using libgdx’s vector class which should give a performance boost for libgdx but I do not know how much. I also may not be using the best method for rendering mass sprites in libgdx. Just batch.begin, render sprites, batch.end.
I will admit I looked at libgdx’s sprite batcher to see how they did things and based mine similarly off theirs. (mainly just the rotation and texregion part ;)).
Sorry for the large files but they both come packed with all natives and everything so…
Controls.
G to generate a bunch of particles/sprites
K to kill them.
libgdx test case
http://www.mediafire.com/?ccomdyb7inpvocy
Notes: no delta so seems slower but looks better.
On my desk top the performance for libgdx is about 60fps at 50k sprites. Very good. Once you go past this tho the performance drops considerably. 30fps at 100k. I think that, that ratio is very nice.
On my laptop with integrated graphics everything is much slower. 50k 40fps or lower. 100k makes me cry.
Stumpy’s test case
http://www.mediafire.com/?wl4w7lenk4f17i7
Notes:uses delta timing so it seems faster but looks bad due to delta can throw things off with low frame rates. Also, don’t use the popup menu to generate particles/sprites as they will be different colors thing libgdx test case.
On my desk top performance is almost identical to libgdx except at 100k it is 1-3fps faster.
On my laptop libgdx is much faster then my sprite batcher 5-8fps. I think this is because my laptop gets fillrate limited almost instantly. In my sprite batcher I do absolutely nothing to lower the fill rate and I have no idea exactly what libgdx does but they are faster.
I would like you all to test the speeds to see what you get.