I've got to the stage of my game where I have hundreds of small meshes in a scene, so I wrote a batching class to reduce the draw calls.
For each frame this class takes any mesh below a certain size in the current camera frustum, transforms the vertex data and joins them all together into one big mesh. The algorithm has to run each frame, because the camera frustum is changing each frame and stuff is moving around as well.
Reducing draw calls decreases the amount of work that the CPU has to do, increasing frame rate, but on the other hand transforming the vertex data each frame increases CPU load. So, there is an optimal level, which I found to be around 100 vertices fro mesh size. In other words, I only batch meshes that have less than 100 vertices and that gives optimal performance.
Is anyone doing something similiar to this? Any tips would be appreciated.
Unfortunately I have to use OpenGL ES 2.0. I know there's probably some cool function in 3.1 that makes this a lot easier, but I don't have access to that.