Question

i tried the hello example on the adobe site.

http://www.adobe.com/devnet/flashplayer/articles/hello-triangle.html

it works, but the context3D seems work on the stage's background in the lowest level. if i draw anything it will cover the 3d context.

i want to bring it to front or set it to a certain level. how can i do that?

also i was told if use 2d api and 3d api together , it will lower the performance of 3d,is it truth?In my works ,i still need 2d api ,for example, drawing the textfield .

Was it helpful?

Solution

Everything goes like this (from bottom to top):

StageVideo (1 or more instances) > Stage3D (1 or more instances) > Your regular display list.

And yes, regular display objects may degrade performance of Stage3D, therefore it may be better to use Stage3D alternatives of those. Some Stage3D accelerated frameworks already has some of those built in (like TextField in Starling).

OTHER TIPS

No, you can't bring it to front. 2d and 3d not relates to each other. But of course, if you write 2d stuff that eat 100% of cpu, you'll get overal slow performance.

the only way is to get from the bottom layer of stage3D instance the rendered bitmap and display it on top of you displayList.. but it should work on each frame, thing that will affect the performance a lot and of course no mouse interaction... this solution will work only to display rendered scene on top of stage3D.. just a simulation

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top