Is there something you need to remove it other than view.scene.removeChild(skyBox)?
I made a simple test program that adds a skybox, renders once, removes the skybox and renders again, and the skybox is still there.
SkyBox still renders after removing it?Software: Away3D 4.x |
||
Stephen Hopkins, Sr. Member
Posted: 16 July 2011 09:44 PM Total Posts: 110 Is there something you need to remove it other than view.scene.removeChild(skyBox)? I made a simple test program that adds a skybox, renders once, removes the skybox and renders again, and the skybox is still there. |
||
Richard Olsson, Administrator
Posted: 17 July 2011 07:05 AM Total Posts: 1192 [ # 1 ] It sounds like you are trying to do it all on a single frame. Is that the case? Drawing on the GPU is asynchronous, so it might simply be that you need to wait for the first “frame” to render before removing the object and invoking render() again. Otherwise give us some code to reproduce and we’ll investigate the issue. |
||
Stephen Hopkins, Sr. Member
Posted: 17 July 2011 09:00 AM Total Posts: 110 [ # 2 ] It was over multiple frames. Hm… Though, I wasn’t checking if the skybox actually still worked, i.e., background changes when rotating the camera. So, I added a rotation to the camera. Once the skybox is removed, the background stops rotating, but the skybox background is still there. Maybe the buffer for the skybox isn’t getting cleared? The view/camera are still working, but the skybox seems to be frozen in place at the moment you removed it. Here’s the program I used. The cube is there so you can see that everything else works while the skybox is stuck. The skybox images can be found here:
package{ |
||
David Lenaerts, Administrator
Posted: 20 July 2011 02:46 PM Total Posts: 80 [ # 3 ] This was a bug in the EntityCollector, which should now be fixed! |