Image format 'ABGR8' is unsupported for TextureAtlas on android

When trying to use the texture atlas on an android device it crashes with the following exception:

com.jme3.app.AndroidHarnessFragment: SEVERE Exception thrown in Thread[GLThread 1667,5,main]
   com.jme3.renderer.RendererException: Image format 'ABGR8' is unsupported by the video hardware.
       at com.jme3.renderer.opengl.TextureUtil.getImageFormatWithError(TextureUtil.java:101)
       at com.jme3.renderer.opengl.TextureUtil.uploadTexture(TextureUtil.java:243)
       at com.jme3.renderer.opengl.GLRenderer.updateTexImageData(GLRenderer.java:2211)
       at com.jme3.renderer.opengl.GLRenderer.setTexture(GLRenderer.java:2249)
       at com.jme3.material.Material.updateShaderMaterialParameters(Material.java:802)
       at com.jme3.material.Material.render(Material.java:962)
       at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:616)
       at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:266)
       at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:305)
       at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:870)
       at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:781)
       at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1097)
       at com.jme3.renderer.RenderManager.render(RenderManager.java:1145)
       at com.jme3.app.SimpleApplication.update(SimpleApplication.java:253)
       at com.jme3.app.AndroidHarnessFragment.update(AndroidHarnessFragment.java:577)
       at com.jme3.system.android.OGLESContext.onDrawFrame(OGLESContext.java:336)
       at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1535)
       at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

The usage of the atlas is:

atlas = new TextureAtlas(width, height);

for(...) { atlas.addTexture(..., "master")); }

masterTexture = atlas.getAtlasTexture("master");

// then, the texture is used

It works fine on desktop devices so… is it an engine (3.1) bug?

It seems like a hardware problem.

According to the comment here and this other post I supposed it shouldn’t be crashing because of the hardware. I’ve tried it in multiple android devices (relatively new ones) and it always throws it.

Using the TextureAtlas class on a live mobile application sounds like a massive design flaw. Its basically meant for when you create the assets for a game to combine textures etc which you later load from a j3o… Its kinda dumb to do that work when the user is starting your app.

I Could premake the combined texture (texture-atlas) in many ways. Saving it in the j3o or making a static atlas but for this specific case I was trying to minimize the atlas size (I dont care about the loading time). The textures being used depend on every match and they are a few compared with the available (eg: 50 images but only 3 used per match). These are per user selection so there isnt a static pre-make option.