Starling can not work when I use air 18 SDK and etc2 format texture.
Thanks to the team of developing air sdk.
Problem Description:
After updated my air sdk to 18.0.0.109 and rebuild my texture used etc2 format, I meet an error "Invalid ATF format" from starling.
The code of Starling like this:
| Starling-Framework/AtfData.as at master · Gamua/Starling-Framework · GitHub | |
| var format:uint = data.readUnsignedByte(); | |
| switch (format & 0x7f) | |
| { | |
| case 0: | |
| case 1: mFormat = Context3DTextureFormat.BGRA; break; | |
| case 2: | |
| case 3: mFormat = Context3DTextureFormat.COMPRESSED; break; | |
| case 4: | |
| case 5: mFormat = "compressedAlpha"; break; // explicit string to stay compatible | |
| // with older versions | |
| default: throw new Error("Invalid ATF format"); | |
| } |
When I use flash builder to debug it, I found the value of the format is 12 or 13, but I do not know what is the type of Context3DTextureFormat can match the value.
And I do not know if there are other format values.
Maybe starling also need to update to new version. The old version can not support the new air sdk 18. But I can not find new version from Staring team.
How can I fix this issue now? Please give me some suggestion, thank you for your help.
