My app currently uses a lot of textures most of which probably could be compressed quite a lot by using ETC2 (my app runs on 4.4 so i have a lot of devices supporting GLES30), i cannot use ETC1 since i need alpha too.
Problem is that i map my textures from a Bitmap i create dynamically (and quite often every 60 seconds), i currently map them this way (textures are not power of 2 sized):
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, id);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, mode);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, mode);
GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0);
So i was wondering if:
- Is it possible to load a Bitmap using ETC2 to use less memory on the graphic card? A code example would be great
- How much overhead does the compression have? Mapping a 1024x1024 ARGB_8888 Bitmap every 60 seconds is feasible?