 				if (_texture)
 					_texture.dispose();
 				
+				var format : String = FORMAT_BGRA;
+				
+				if (_atf)
+				{
+					if (_atfFormat == 5)
+						format = FORMAT_COMPRESSED_ALPHA;
+					else if (_atfFormat == 3)
+						format = FORMAT_COMPRESSED;
+				}
+				
 				_texture = context.createTexture(
 					_width,
 					_height,
-					_atf && _atfFormat == 2 ? FORMAT_COMPRESSED : FORMAT_BGRA,
+					format,
 					_bitmapData == null && _atf == null
 				);
 

			
			atf.position 	= 6;
			
			_atfFormat 		= atf.readUnsignedByte() & 3;
			_width 			= 1 << atf.readUnsignedByte();
			_height 		= 1 << atf.readUnsignedByte();
			_mipmap 		= atf.readUnsignedByte() > 1;

	 */
	public class TextureResource implements ITextureResource
	{
		private static const MAX_SIZE					: uint		= 2048;
		private static const TMP_MATRIX					: Matrix	= new Matrix();
		private static const FORMAT_BGRA				: String	= Context3DTextureFormat.BGRA
		private static const FORMAT_COMPRESSED			: String	= Context3DTextureFormat.COMPRESSED;
		private static const FORMAT_COMPRESSED_ALPHA 	: String 	= Context3DTextureFormat.COMPRESSED_ALPHA;
		
		private var _texture	: Texture		= null;
		private var _mipmap		: Boolean		= false;
