I have a game engine, but its very slow. I get on a 60-80 textured squares (2 triangles with blends) about 30-40 FPS on my galaxy s. This is a live wallpaper. I get on my Legend only 10-20 FPS on 80 items...
I used VBO's, culling and other optimisations. (i tried texture atlas, the same speed as binding textures...)
what can i do there?
1, if I use native opengl render code, that will speed up my rendering? 2, if i use PVRTC compressed textures, not png-s, that will speed up the rendering? how i can do that开发者_StackOverflow?
what can i do?
Yes... I believe you should see a substantial speed up if you switch over to to using the NDK for OpenGL. As for PVRTC... I'm not 100% sure if that's the way to go. That is a format optimized for PowerVR chipsets... so yes... that's great for the Galaxy S variety of phones... but every phone with a Snapdragon processor run a different GPU (Adreno). I have no idea if the Adreno GPU would make good use of it.
No GPU, to my knowledge, natively supports PNG images as a texture format. These are invariably decompressed by the API/driver to ARGB (probably @ 32bpp), so there will be a hit in terms of memory space and, more importantly, bandwidth consumption. PNG really only buys you a reduction in terms of distribution of the application and flash memory storage space.
Provided you aren't insanely obsessive about image quality, using some form of (lossy) texture compression, say PVRTC (4bpp or 2bpp) or, maybe, ETC (4bpp), will probably be a win for performance.
精彩评论