The best way to improve texture loading performance on Android is to use the extended extensions EGL and EGL_NATIVE_BUFFER_ANDROID with native code. I have some sample code in this article . I measured major performance improvements with this approach.
Android does not support Pixmaps, and pbuffers do not work on Nvidia Tegra devices. Instead, you should use FBO-attached textures. Thus, the Android SurfaceTexture class is implemented.
If you need alpha textures, this is another reason to use native code. There is a compatibility issue between Bitmap and OpenGL ES with alpha textures.
The use of hardware texture compression formats (ETC / PVR instead of PNG) and mipmaps also significantly improve download performance and the quality of texture rendering, as discussed in this article.
The big problem is glReadPixels (). EGL_NATIVE_BUFFER_ANDROID only works for writing textures, not for reading them into a bitmap image. Android platform code uses glReadPixels () to implement TextureView.getBitmap (), and it is very slow. The best solution is not to copy the texture to the bitmap, but to display the displayed TextureView directly, which avoids glReadPixels ().
I am working with OpenGL ES 2.0, and the situation may have been improved with 3.0.
source share