Last weeks I have been working hard on optimizing our 3D engine JellyTouch. I have tried eventually all recommended methods to improve rendering performance and discovered that some of them work well, some provide small benefit and some don’t work at all. I think it is a good idea to share my results and probably have some feedback. The tests were performed on one of the most popular models – iPhone 3G 16GB.
This works well:
Triangle stripping. This classic technique which is often mentioned as obsolete nowadays still does its job. It has shown a dramatic performance boost in our tests, especially for large meshes. Try my triangle stripping utility to check how it works for you.
Using smaller data types for geometry. This reduces memory footprint for 3D objects and also improves performance significantly.
Using glDrawElements instead of glDrawArrays. It is indeed faster because it eliminates the need for repetitive vertices. Repetitive indices are much cheaper because they have smaller size.
This works but not so well:
Using smaller textures. Helps to save memory but doesn’t speed things up a lot. I only noticed a small speed gain.
Using V3_N3_T2 interleaving. In my tests it came out to be a little bit (approx. 2%) faster then other types of interleaving.
This doesn’t work:
PVRTC texture compression. It seems that this method is intended to reduce the size of the texture but not rendering performance. The FPS was even less then it was with plain PNG textures.
Using VBO. This actually works but only on iPhone 3GS and later devices to follow. Generations 3G and below don’t seem to benefit from this so probably VBO is not yet implemented although the API supports it.