Draw to bitmapData

Software: Away3D 4.x

Svist, Newbie
Posted: 20 September 2013 08:02 AM   Total Posts: 14

Hello everyone!
Need to render the scene in a bitmap without a background.
In previous versions, it is possible to do by using these steps:

view.renderer.swapBackBuffer = false;
view.render ();
view.stage3DProxy.context3D.drawToBitmapData (bitmapData);
view.renderer.swapBackBuffer = true;

Now using version 4.1.4.
In this version, not possible to do the same, as the “renderer” does not have the property “swapBackBufferr”.

If use the “queueSnapshot ()” I get a screenshot of the scene with the background.

Is it possible to make a screenshot of the scene without the background?

Thank you!

   

Avatar
SharpEdge, Member
Posted: 20 September 2013 08:35 AM   Total Posts: 94   [ # 1 ]

i think that you could do (it’s not so good but maybe works):

view.backgroundAlpha 0;
view.renderer.queueSnapshot (bitmap);
view.render();
view.backgroundAlpha 1
   

Svist, Newbie
Posted: 20 September 2013 08:46 AM   Total Posts: 14   [ # 2 ]

Yes! It’s working! Thank you so much!

   

Guido, Member
Posted: 15 November 2013 10:47 AM   Total Posts: 70   [ # 3 ]

It’s working for me too.

   

Avatar
SharpEdge, Member
Posted: 19 November 2013 09:20 AM   Total Posts: 94   [ # 4 ]

I’m glad that works!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X