|
Biegzie, Jr. Member
Posted: 14 June 2012 12:40 PM Total Posts: 39
I’m working on a air project in flash builder. When I add a scene, the View3D will not overlay the interface. It falls below all embedded textures. Only the part where there is just the application background is rendered.
The view3D is called in a class afterwards all UI textures are loaded. So… this is very strange. If i add a regular Sprite on the same place, the Sprite will be displayed in the right way. Does anyone knows what to do?
|
Fabrice Closier, Administrator
Posted: 14 June 2012 01:08 PM Total Posts: 1265
[ # 1 ]
Stage3D is by default rendered in a layer under the display list layer. So unless you either render the interface using a 2d stage3d api (Starling etc) or ensure that overlaying interface as displaylist has a “hole” for the viewport rect, you will not be able to do that.
|
Biegzie, Jr. Member
Posted: 14 June 2012 01:11 PM Total Posts: 39
[ # 2 ]
thx for the reply,
is it possible to copy the bitmapdata and put it into a Sprite?
|
Fabrice Closier, Administrator
Posted: 14 June 2012 01:34 PM Total Posts: 1265
[ # 3 ]
I’m not sure I understand your question. If you can paste a bitmapdata and add it to stage? Yes, thats easy using addChild(new Bitmap(mybmd));
If you compare Stage3D with BitmapData, then I’d say you should read about the concepts of the player 11 and higher… You could in very rare cases need the “rendered” viewport “bitmapdata” and display it elsewhere, but its extremely costly and surely a bad (and I mean bad) idea if its ment to fix your above problem.
I couldn’t find back the original “Molehill” nice layer visualisations
but found this one instead
http://www.adobe.com/devnet/flashplayer/articles/how-stage3d-works.html
look at
Stage3D: The stage behind the Stage
Hope it helps.
|
Biegzie, Jr. Member
Posted: 14 June 2012 01:37 PM Total Posts: 39
[ # 4 ]
i found the answer:
_loader.rotationX += 1;
_view.renderer.swapBackBuffer = false;
_view.render();
_view.stage3DProxy.context3D.drawToBitmapData(bitmapHolder);
_view.renderer.swapBackBuffer = true;
bitmap.bitmapData = bitmapHolder;
you can put the ditmap data in the regular displayobjects…
so this is stage3D copy as a Sprite
|
Fabrice Closier, Administrator
Posted: 14 June 2012 01:43 PM Total Posts: 1265
[ # 5 ]
yes, as said above: “ts extremely costly and surely a bad (and I mean bad) idea if its ment to fix your above problem.”
|
Biegzie, Jr. Member
Posted: 14 June 2012 02:13 PM Total Posts: 39
[ # 6 ]
yes.. but no experience with 2D stage3D renders..
so for this project, it will be like this..
|