Skip to main content
Participant
January 13, 2014
Question

How do I load an .atf file into a ByteArray for upload to the GPU?

  • January 13, 2014
  • 1 reply
  • 570 views

I'm trying to optimise the amount of GPU memory my textures use for a Stage3D project so I thought I'd finally switch to ATF textures. I've converted them from png to atf using the png2atf tool and I'm loading them with a URLLoader but I'm having trouble passing the textures into ByteArrays. I've tried various things and I'm running out of ideas; Does anyone know the AS to pass a loaded atf into a ByteArray? I need it to be a ByteArray for upload to the GPU with the

uploadCompressedTextureFromByteArray method on the Texture class - unless someone knows better...

This topic has been closed for replies.

1 reply

Inspiring
January 14, 2014
Participant
January 14, 2014

Hello there. Thanks for the reply, but I had already seen that page (I've been searching online a lot for a solution to this). That page only details using the Embed tag to add the .atfs. I want to load them in at run time with a URLLoader. THAT's working fine; It's then passing the loaded object into a ByteArray that I'd like help with. Cheers.