Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues when removing and readding View3D to stage #54

Open
david-gregory opened this issue Jun 2, 2011 · 0 comments
Open

issues when removing and readding View3D to stage #54

david-gregory opened this issue Jun 2, 2011 · 0 comments

Comments

@david-gregory
Copy link
Contributor

Away3D, as is, causes this error when adding, removing, and re-adding View3D to the stage.

Main Thread (Suspended: Error: A Stage3D instance was already assigned!)

  • away3d.core.render::RendererBase/set stage3DProxy
  • away3d.containers::View3D/onAddedToStage
  • flash.display::DisplayObjectContainer/addChild [no source]

This is caused by the renderer's 3D proxy not being set to null. To fix this, we should be calling _renderer.dispose() and _depthRenderer.dispose() in the View3D.onRemovedFromStage() function. Note that RendererBase.dispose() does nothing except set this pointer to null.

After doing so, we get a successful call to onAddedToStage the 2nd time. However, the next call to render() bombs with the following callstack:

Main Thread (Suspended: Error: Error #3698: The back buffer is not configured.)

  • flash.display3D::Context3D/clear [no source]
  • away3d.core.render::RendererBase/executeRender
  • away3d.core.render::RendererBase/render
  • away3d.containers::View3D/render
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant