I would use visibility flags to show only the elements you want
in each scene.
For example:
Code: Select all
int scene1 = 2;
int scene2 = 4;
cubeEntity->setVisibilityFlags(scene1);
planeEntity->setVisibilityFlags(scene1);
sphereEntity->setVisibilityFlags(scene2);
// Or if you want to show an object in both scenes
entity->setVisibilityFlags(scene1 + scene2);
then use setVisibilityMask(scene1) for the main viewport, and setVisibilityMask(scene2) for the RTT viewport.
Another way would be to use a
render target listener to
hide the cube immediately before the RTT is drawn, and show it again afterwards.
Or you could use two separate scene managers, but that's probably overkill.