Skip to main content
May 5, 2015 10:17 AM UTC
Question

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.

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Vivek Negi
Adobe Employee
Adobe Employee
May 6, 2015 8:26 AM UTC

Hi,

Could you please provide your sample project so that we can invsitagte more into this.

also , did you try using Context3DTextureFormat.COMPRESSED_ALPHA as one of the value in Format?

-Vivek

Translate
May 7, 2015 2:05 AM UTC

Hi Vivek Negi,

Thank you for your reply.

I have used the Context3DTextureFormat.COMPRESSED_ALPHA to test my application. The value 13 is ok, but the value 12 still can not work. Do you know other value of format and other types of  Context3DTextureFormat?


I do not know if air 18 added some new types of Context3DTextureFormat.

Thank you.

Translate
Vivek Negi
Adobe Employee
Adobe Employee
May 7, 2015 1:46 PM UTC

Hi,

Could you please provide your project and device ,so that we can investigate more.

-Vivek

Translate