[solved][libGDX] Texture compression with packed texture atlas?

Is there a way to use texture compression with a TextureAtlas?

The doc (https://github.com/libgdx/libgdx/wiki/Texture-Compression) says there is a way to compress texture:

Pixmap pixmap = new Pixmap(Gdx.files.absolute("image.png");
ETC1.encodeImagePKM(pixmap).write(Gdx.files.absolute("image.etc1"));

And use it later:

Texture texture = new Texture(Gdx.files.internal("image.etc1"));

How about atlas?


Ok, seems like the answer is:

  1. Take atlas PNGs and compress them manually
  2. Make surgery to the atlas file replacing all PNG-references to ETC1