How to get the image (bitmapdata) of what we see on the screen (stage3D)

Software: Away3D 4.x

hiroalex, Newbie
Posted: 16 February 2012 07:59 PM   Total Posts: 15

Hi,

I need to take snapshots of the 3D scene, it was easy before with display objects, but now I don’t know how to get the bitmapdata of the stage3D scene that is displayed on the screen…
Thank you in advance for your help.

Alex

   

Hector, Sr. Member
Posted: 16 February 2012 09:27 PM   Total Posts: 137   [ # 1 ]

I got it somewhere in this forum and it works for me:

var bmd:BitmapData = new BitmapData(view.widthview.heighttrue0x000000);
view.renderer.swapBackBuffer false;
view.render();
view.stage3DProxy.context3D.drawToBitmapData(bmd); 
view.renderer.swapBackBuffer true
   

hiroalex, Newbie
Posted: 16 February 2012 10:37 PM   Total Posts: 15   [ # 2 ]

It seems to work! Thank you!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X