HI Jochen,
What you need to do is use a render to texture (RTT) technique, with
rendering the six scenes to six separate textures or the six scenes to
the six faces of a cube map texture. The OSG supports both approaches
and each approach is essentially the same setup - you create an
osg::Camera to render each scene to a texture/texture face, the only
difference is the assignment of the texture(s) to the various Cameras.
Another decision you need to make is how you want to interact with
each scene - it's a fixed view of each scene, or do you want to treat
it as a separate View with it's own camera manipulator/event handlers?
With a fixed view then you could just set each Camera's View matrix
at setup time, add the scene as a subgraph to the Camera and then add
this Camera to the scene graph. If you want each View to be
interactive then you could do this using CompositeView with each scene
having it's own osgViewer::View.
In all these case the Camera set up, whether it's a render to texture
Camera in the scene graph or a the master Camera of osgVIewer::View
will essential be the same - you just assign the texture/texture face
to each Camera.
Then you'll want to have one last Camera or View (with it's master
Camera) that renders to the window and use all the results from the
RTT Camera's. To ensure that the various RTT Camera's are rendered
before the main Camera you'll want to use
Camera::setRenderOrder(osg::Camera::PRE_RENDER);
There aren't any OSG examples that do exactly what you want, but you
can have a look at the osgprerender, oreprerendercubemap and
osgdistorion examples to see how RTT can be done in various ways. The
osgcompositeviewer will also give an illustrate of using multiple
Views with multiple Scenes, this example doesn't do an RTT but could
easily be adapted to do so by adding the appropriate texture
attachments and render order settings.
Hopefully once you get familiar with RTT osg::Camera usage it'll all
start to make sense - this part of the OSG is very powerful and
flexible but can be a bit overwhelming the first time you start to
dive in.
Robert.