I use Rajawali library in my app.
I am trying to create png images with option
options.inPurgeable = true;
options.inInputShareable = true;
options.inSampleSize = sampleSize;
options.inDither = false;
options.inScaled = false;
options.inPreferredConfig=Bitmap.Config.RGB_565;
since i think it reduces memory usage.But it cause a error at
GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, mBitmapFormat, mBitmap, 0);
in the class ASingleTexture;
But if i remove
options.inPreferredConfig=Bitmap.Config.RGB_565;
then no error occur but use high memory.How to solve this issue
If I'm not mistaken, the bitmaps you use for OpenGL textures need to be with ARGB_8888 config. Sure, each bitmap will require more memory this way, but here are a few points to remember: