Stopping View3D.render() on iOS

Software: Away3D 4.x

Donny, Jr. Member
Posted: 23 August 2012 04:15 AM   Total Posts: 34

I’m using AIR 3.3 with latest Away3D on master branch. When I remove the ENTER_FRAME event listener that’s calling View3D.render() nothing seems to update after on either the Flash or Stage3D display. I’m still able to get events (using the device debugger deployment) but nothing is updating on the display. This works fine on browser, and AIR install. But not on iPad3 with latest public OS.

I should also note I’ve pulled what’s displaying in Away3D back to the Trident.

   

Richard Olsson, Administrator
Posted: 23 August 2012 11:53 AM   Total Posts: 1192   [ # 1 ]

This is how AIR works on mobile. If your code (including Away3D) requests a Stage3D context, the entire viewport (including the Flash display list) will only update when that context is updated. That happens, for example, when rendering the View3D. So you have to keep rendering the view, or at least call clear() and present() on the context.

If you do not want to do this, you have to return the context to the runtime so that it can take care of the render loop for you again. You do this in Away3D by calling View3D.dispose(). Remember to dispose all your assets as well, like geometries, textures et c.

   

Donny, Jr. Member
Posted: 23 August 2012 10:51 PM   Total Posts: 34   [ # 2 ]

Ah right, thanks for the explanation. I’ve just toggled all elements visibility when I’m not displaying the Stage3D and that works fine. It’s quite a gotcha without prior knowledge!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X