Lights instantiated in a scene influance other scenes.
This bug is due to a mis-interpretation of Ogre behaviour on lights management.
In Ogre, lights a re active on creation. Even if they are not appended to a scene tree, or they are appended to a tree that is detached form the SceneManager root object.
To solve we must add an "enabled" flag to the LightObject class and set the corresponding Ogre::Light status on showScene() events. Of couse, all Ogre::Lights must be turned off on hideScene() events.
Fixed adding an "enabled" attribute to the LightObject.
Now everytime a Scene is hidden, a onSceneHide() method is invoked and the lights which are enabled in Tarta4D are disabled in Ogre3D.
Analoguous behaviour when showing a scene.
Lights on cameras still influence other scenes. Turn on/off also light of cameras.
Shaders are affected by light in every scene, also if the scene is hidden/detached.
It is cuased by the OGRE shading program/material definition which sends the lights using "param_named_auto": it sends the first lights closest to the mesh, ignoring the Tarta4D scene management.
We should create new automatic parameters in tarta4D, or finding another way to manage different loaded scene...