My experience so far: - Create your textures in power of two and make sure you scale and clip them to the right ratio when you draw. - Don't stick to RBGA_8888 when you can do ALPHA_8 (text rendering) - Do whatever you can do in OnSurfaceCreated before you get called in OnSurfaceDraw - Avoid the GL11 context cast. Some things won't work e.g glColor4ub will compile but not work. - Balance your calls of enable and disable for each component draw your call into your scene graph. - Pre-allocate your nio buffers - Use DrawElements but for the simplest shapes of one vertice - Test on as many devices as you can. Just don't settle for the emulator e.g. non power of twos work on emulator but not on the phone. - If you can then use the on demand drawing. - Use the trick of putting a wait in the onTouchEvent call for 20ms and a notify in your onDraw to reduce the deluge of motion events you have to process. You can bypass onTouchEven and use a lower call to save some cycles as well. - Use texture atlas as much as you can e.g. to draw score and text or animations - Disable the fancy rendering options (DITHER_TEST etc...) Unless you crave a realistic rendering on textures. - If you draw in 2D, then disable the DEPTH_TEST - Don't forget the Bitmap.recycle() call when you are done binding your textures. - Avoid Object creation destruction (PointF Rect) in your rendering routines. GC calls will slow down your frame rate. - Preload your textures extensively. don't wait until you draw at the last minute to bind your textures. The lag is noticable if you do so it's better at app start up time.
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en