I am currently showing a single-frame animation in full screen on SurfaceView using a timer and Canvas.onDraw()/canvas.drawBitmap. Each frame has a resolution of 480x320 pixels and will be stretched during drawing to screen resolution. It works quietly on faster devices, providing a frame rate of up to 15 frames per second. The problem is that I have to upload every frame (the animation consists of 30 single frames that loop) before the animation starts, as the animation will be displayed at a high frame rate. Given the small heap for Android processes, typically 16 MB, most of my test devices cannot preload all 30 frames into memory, so I am thinking of using OpenGL instead. Since I am reading OpenGLs, memory will not be considered in the 16-bit process heap space, using OpenGL may be an alternative.
Now my question is: Will OpenGL be fast enough to change and display textures (my single frames) fast enough to reach a high frame rate of 15 frames per second? I read an article that said texture sharing too often slows down OpenGL. Have you had any experience? I donβt want to waste time launching OpenGL, if you can already say that replacing full-screen textures with 15 frames per second is not possible.
Edit:
Now I am using a technique that uses the Android NDK by default without using OpenGL. See my answer here .
source
share