Hello,

the problem is that I want to use a embedded viewer (gtk), too. I guess it 
doesn't work with the composite viewer. Or is it possible?

Cheers

Martin


-------- Original-Nachricht --------
> Datum: Fri, 29 Oct 2010 10:58:10 +0200
> Von: "J.P. Delport" <[email protected]>
> An: OpenSceneGraph Users <[email protected]>
> Betreff: Re: [osg-users] Two Viewports with one Camera

> Hi,
> 
> On 29/10/10 10:48, "Martin Großer" wrote:
> > Ok. I try the slave variant.
> >
> > I have a additional question. When I use two different cameras and
> > three viewports, how would you implement this. Two viewport have the
> > first camera and the third viewport has the second camera.
> >
> > My idea is something like this:
> >
> > // Camera 1 osg::Camera* cam1 = new ... slaveCam1->setViewport(...);
> >
> > // Slave Camera 1 osg::Camera* slaveCam1 = new ...
> > slaveCam1->setViewport(...);
> >
> > // Camera 2 osg::Camera* cam2 = new ... cam2->setViewport(...);
> > cam2->addChild(scene);
> >
> > // RootNode // Camera two as a part of the scene graph. Is this
> > clever? osg::Group* root = new ... root->addChild(scene);
> > root->addChild(cam2);
> >
> > // Viewer osg::Viewer* viewer = new ... viewer->setSceneData(root);
> > viewer->setCamera(cam1); viewer->addSlave(slaveCam1);
> >
> >
> > Is this the right way? And what is your commendation to use different
> > camera manipulators. That means, what can I do when I want to use a
> > manipulator for the second camera (the camera in the root node).
> >
> > My idea is to write a GUIEventhandler. This should check the mouse
> > position and give the viewport or the camera and then I calculate the
> > new position like the trackball manipulator. That is the approximate
> > idea.
> 
> Do you want something different from what happens if you run 
> "osgcompositeviewer cow.osg". There, each view can have its own
> manipulator.
> 
> jp
> 
> >
> > Cheers
> >
> > Martin
> >
> >
> > -------- Original-Nachricht --------
> >> Datum: Fri, 29 Oct 2010 09:21:29 +0100 Von: Robert
> >> Osfield<[email protected]> An: OpenSceneGraph
> >> Users<[email protected]> Betreff: Re: [osg-users]
> >> Two Viewports with one Camera
> >
> >> Hi Martin,
> >>
> >> I'm a bit confused by the thread, but as a general note you
> >> shouldn't go attempting to use two separate Viewport per Camera.
> >> The OSG fully supports slave Camera that can share scene graphs and
> >> share the same graphics context, so it's straight forward to
> >> implement and manage, the osgViewer design has been specifically
> >> designed to make this type of usage as simple as possible.
> >>
> >> Robert.
> >>
> >> 2010/10/29 "Martin Großer"<[email protected]>:
> >>> Hello all,
> >>>
> >>> I would like use two viewports in my application and one camera.
> >>> Is this
> >> possible? I think, the normal way is to define the viewport for a
> >> camera like: camera->setViewport(...)
> >>>
> >>> Is the only way to define camera, copy the camera and set the
> >>> viewports
> >> separatly for every camera? The main problem is when I change the
> >> camera settings, I have to copy the camera again.
> >>>
> >>> Cheers
> >>>
> >>> Martin -- GMX DSL Doppel-Flat ab 19,99&euro;/mtl.! Jetzt auch
> >>> mit gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
> >>> _______________________________________________ osg-users mailing
> >>> list [email protected]
> >>>
> >>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >>>
> >>
> >>
> _______________________________________________
> >> osg-users mailing list [email protected]
> >>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> 
> -- 
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard. 
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
> 
> This message has been scanned for viruses and dangerous content by
> MailScanner, 
> and is believed to be clean.  MailScanner thanks Transtec Computers for
> their support.
> 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
GRATIS! Movie-FLAT mit über 300 Videos. 
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to