We are developing a game with cocos2d-x, and we have upgraded engine version to v2.0.3. Right now the game was running smoothly on the general popular mobile devices, but we met performance problem with some old android devices.
We dug the problem deeply, and it turns out that the bottle neck is the GPU pixel fill rate. We tried to use SpriteBatchNode(1 GL draw) to draw same 1000 big sprites at same position, FPS drops down obviously even on iTouch4. On code side, we found out GL_DEPTH_TEST is disable by default, and all the sprites’ vertexZ is 0.0. So it means game draw the same sprites 1000 times even 999 has been covered.
Is there any quick and safe way to avoid such overdraw problem? I mean without changing the engine throughly. 1st thing came out from my mind is that enable GL_DEPTH_TEST then update vertexZ on our own with Project2D mode, but I don’t know if it can make the things better or it could bring other problems.
Currently we are trying to avoid it by artist side, but it’s not radical solution.
Any suggestion would be thankful.