Copy link to clipboard
Copied
I have a script that uses a lot of complicated .draw calls with matrix transformation (scale and shift), displaying different parts of a big image (thousands by thousands px) in a kind of navigatior window.
Currently it's done in "old" AS3 for FP10. Is there a way to speed these calls up using GPU and stage3D in the new player FP11?
Can GPU help with that kind of image manupulation?
Copy link to clipboard
Copied
Anyone?
Are there any Adobe developers here who might know the answer?
Copy link to clipboard
Copied
Another bump... can not believe nobody knows this...
Copy link to clipboard
Copied
Yes, using Stage3D improves performance dramatically.
Copy link to clipboard
Copied
Good news, thank you!
Can anyone tell me what could be a Stage3D equivalent of this:
var img:BitmapData = .......
var rgn:Rectangle = ........
var scl:Number = ....
var matrix:Matrix = new flash.geom.Matrix();
rgn.x *= scl;
rgn.y *= scl;
rgn.width *= scl;
rgn.height *= scl;
matrix.scale(scl,scl);
matrix.tx = -rgn.left;
matrix.ty = -rgn.top;
var mapBD:BitmapData = new BitmapData(rgn.width,rgn.height,false,0x000000);
mapBD.draw(img,matrix,null,null,new Rectangle(0,0,rgn.width,rgn.height),true);
var mapLayer:Bitmap = new Bitmap(mapBD);
Copy link to clipboard
Copied
You need to use shaders or AGAL (which, essentially a runtime shader). There is no direct correlation between regular AS3 bitmapdata manipulations and Stage3D.
Copy link to clipboard
Copied
Here is an intro to AGAL and shaders:
http://www.adobe.com/devnet/flashplayer/articles/what-is-agal.html