Cut and past the following into a file named 'twoWindows.cfg':
Camera "Camera 1"
{
RenderSurface "RenderSurface 1"
{
Visual { SetSimple }
Screen 0;
WindowRect 10 10 620 480;
InputRectangle -1.0 0.0 -1.0 1.0;
}
Lens {
Frustum -0.55228475 0.55228475 -0.41421356 0.41421356 1 1000.0;
}
Offset {
Shear 1.0 0.0;
}
}
Camera "Camera 2"
{
RenderSurface "RenderSurface 2"
{
Visual { SetSimple }
Screen 0;
WindowRect 650 10 620 480;
InputRectangle 0.0 1.0 -1.0 1.0;
}
Lens {
Frustum -0.55228475 0.55228475 -0.41421356 0.41421356 1 1000.0;
}
Offset {
Shear -1.0 0.0;
}
}
InputArea
{
RenderSurface "RenderSurface 1";
RenderSurface "RenderSurface 2";
}
{
RenderSurface "RenderSurface 1"
{
Visual { SetSimple }
Screen 0;
WindowRect 10 10 620 480;
InputRectangle -1.0 0.0 -1.0 1.0;
}
Lens {
Frustum -0.55228475 0.55228475 -0.41421356 0.41421356 1 1000.0;
}
Offset {
Shear 1.0 0.0;
}
}
Camera "Camera 2"
{
RenderSurface "RenderSurface 2"
{
Visual { SetSimple }
Screen 0;
WindowRect 650 10 620 480;
InputRectangle 0.0 1.0 -1.0 1.0;
}
Lens {
Frustum -0.55228475 0.55228475 -0.41421356 0.41421356 1 1000.0;
}
Offset {
Shear -1.0 0.0;
}
}
InputArea
{
RenderSurface "RenderSurface 1";
RenderSurface "RenderSurface 2";
}
Then run:
osgviewer -c twoWindows.cfg cow.osg
2) Create the config file programatically and pass the Producer::CameraConfig to osgProducer::Viewer's constructor.
-don
On 9/18/06, Elk, M.G. (Michel) van <[EMAIL PROTECTED]> wrote:
During the discussion on sharing resources between viewers,Don Burns wrote:The use of two viewers (I assume you mean two osgProducer::Viewers), is expected to work as you have experienced. However, applications should use only one viewer with a configuration for multiple windows.My question: How can I create multiple windows using one osgProducer::Viewer?Anyone?Thanks & regards,Michel
This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
