xeolabs/scenejs — Issue #138: 2 starts seems to loose texture
Author: hwilliam
Created: 2011-10-17 11:59:20+00:00
State: open

Using scenejs V0.8

I have 2 scenes with 2 different apps, these 2 scenes uses textures alpha maps etc…

When I switch the rendering from the scene1 to the scene2, I stop the first scene, then I start the second one using the following code

SceneJS.withNode(sceneName1).stop();

SceneJS.withNode(sceneName2).start({
idleFunc: function () {

_selfMM.IdleAnimation();

}
});

In this case, the result is ok, but when I want to switch back to the scene2, some texture are missing or rendered in black

SceneJS.withNode(sceneName2).stop();
SceneJS.withNode(sceneName1).start({
idleFunc: function () {

_selfCF.IdleAnimation();

}
});

I notice that scenejs doesn’t re-recreate textures during the second ().start of scene1 and assume that texture/GLtexture are ok. But the result on screen is wrong

Not sure it is a bug, but after many debugs I can’t see where I am wrong …

Question: Can I use 2 scene or more and switch them using start and stop ?,
is Scenejs uses some global to both scene ?
how to restart a scene properly ?