i have to use texture compression as my app is currently using up to 100MB of ram for textures.
i am creating textures from Views, so it is not possible for them to be created in a compressed format. how can i compress them with ETC1/ATC/PVRTC on the fly and send them to gpu? i tried:
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, ETC1.ETC1_RGB8_OES, bitmap, 0);
i also tried other compression formats supported by my phone, but the texture is always white. the input bitmap is an RGB_565 and mip-maps are disabled.
is it possible to send a bitmap as a texture to opengl es 1.1 so it gets automatically compressed on android, like it is possible on a pc?
with help from Arne Bergene Fossaa i get to this solution:
i know about the ETC1Util.compressTexture and ETC1Util.loadTexture, but they were giving corrupted textures. good thing is that i went from 100MB down to 26MB with native memory consumption. but this solution is slow as hell. and even though it is done on a separate thread with min priority, the rendering thread is totally blocked. is there a more efficent way? or do i have to create these ETC1 textures on the first run on a new device and save them to SD card for later reuse?