actionscript - Using flash movieclip with stage3d -


i have flash movieclip retina resolution (about 200 frames) , action script inside. use stage3d performance boost. possible add movieclip stage3d stage without losing action script?

short answer: no.

long answer: not exactly. actionscript still executes in same way regardless of output. however, if have content want rendered in gpu, need decoupled actionscript code. have have same movieclip being executed , frames being sent gpu on fly. massive resource hog - gpu great when rendering things, have data (your "textures") there , takes time. upload gpu complicated , can real bottleneck - not should every frame. , in case you'd still need draw() movie anyway, performance gain during final blitting moot.

if animation small , short enough, can render every frame same single bitmap tiled animation (like sprite sheet). upload massive image (up 2048x2048, in cases, or 4096x4096 in newer gpus) hardware , change "frame" changing (uv) mapping coordinates. far fastest way play animation in flash. stated, requires frames composed same image (on-the-fly or not), , uploaded once. 200 frames, animation have of dimensions of 146x146 (more or less) possible, can complicated (you're need more spritesheets).

you have 1 texture per frame too. that'd little bit more annoying loading work. use starling's movieclip have play. again actionscript lost - you'd need re-add them code somehow, checking frame example.

another solution may having animation video , using stagevideo instead. it's super best , more suited complex content being animated.

tl;dr: hardware acceleration great in flash, definition works in circumstances. things better handled flash.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -