Hey, I’m using Away3D 4.0, and the following snippet results into a crash:
// _view is a View3D
_view.render(); // works
_view.stage.displayState = StageDisplayState.FULL_SCREEN;
_view.render(); // crashes in software mode, works in hardware mode
The relevant section of the stack trace I get is:
Error: Error #3694: The object was disposed by an earlier call of dispose() on it.
at flash.display3D::Context3D/configureBackBuffer()
at away3d.core.managers::Stage3DProxy/configureBackBuffer()
at away3d.containers::View3D/updateBackBuffer()
at away3d.containers::View3D/render()
As a workaround, I’ve tried saving camera and scene data from old view, then removing it from scene (disposing of it causes the same issue later), then creating a new View3D after resizing the scene - and that “works”, except that since I never disposed of the old one, after a couple of tries, it runs out of contexts to use.
Is there anything I can do to work around these issues? Am I perhaps doing something wrong? Any advice here is highly appreciated.