how to implement the runtime compression of texture?
I've read the doc here:
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d5b.html
Flash Player 11.4 and AIR 3.4 support runtime texture compression, which is useful in certain situations, such as when rendering dynami textures from vector art. To use runtime texture compression, perform the following steps:
- Create the texture object by calling the Context3D.createTexture() method, passing either flash.display3D.Context3DTextureFormat.COMPRESSED orflash.display3D.Context3DTextureFormat.COMPRESSED_ALPHA in the third parameter.
- Using the flash.display3D.textures.Texture instance returned by createTexture(), call either flash.display3D.textures.Texture.uploadFromBitmapData() orflash.display3D.textures.Texture.uploadFromByteArray(). These methods upload and compress the texture in one step.
I tried to follow the steps but get an error:
Error: Error #3763: Sampler 0 binds a texture that that does not match the read mode specified in AGAL. Reading compressed or single/dual channel textures must be explicitly declared.
at flash.display3D::Context3D/drawTriangles()
should I put some instruction on agal side also?
