Thank you very much, Fabrice!
I’m using AIR 3.3, and the problem hasn’t solved. I have set
<renderMode>direct</renderMode>
<depthAndStencil>true</depthAndStencil>
but if I set -swf-version = 16, error is out:
Error: Error #3709: The depthAndStencil flag in the application descriptor must match the enableDepthAndStencil Boolean passed to configureBackBuffer on the Context3D object.
at flash.display3D::Context3D/configureBackBuffer()
at away3d.core.managers::Stage3DProxy/onContext3DUpdate()[/Users/mani/Documents/java/away3d 4.0/Away3D/src/away3d/core/managers/Stage3DProxy.as:232]
I just set -swf-version=13 to make it work.
And I just encountered a new problem about get 3d bitmap:
view3d.renderer.swapBackBuffer=false;
view3d.render();
view3d.stage3DProxy.context3D.drawToBitmapData(bd);
view3d.renderer.swapBackBuffer=true;
When I call it after the mesh added, it works fine. But after a while, it return a white bitmap, I use this:
public function getSceneBitmapData():BitmapData
{
var bd:BitmapData=new BitmapData(view3d.width, view3d.height);
view3d.renderer.swapBackBuffer=false;
view3d.render();
view3d.stage3DProxy.context3D.drawToBitmapData(bd);
view3d.renderer.swapBackBuffer=true;
}
Thanks again!