Oh yes, now I understand it!
I must delegate the functionality to the views. For example:
viewer->setSceneData(...) ...;
MyCompsiteViewer(...){... getView(i)->setSceneData(...); }
And I write a own setUpViewerAsEmbeddedInWindow(...) like that:
GraphicsWindowEmbedded* setUpViewerAsEmbeddedInWindow(int x, int y, int width,
int height)
{
setThreadingModel(SingleThreaded);
osgViewer::GraphicsWindowEmbedded* gw;
gw = new osgViewer::GraphicsWindowEmbedded(x,y,width,height);
// camera of the view with id i
getCamera(i)->setViewport(new osg::Viewport(0,0,width,height));
double ar = static_cast<double>(width)/static_cast<double>(height);
getCamera(i)->setProjectionMatrixAsPerspective(30.0f, ar, 1.0f, 10000.0f);
getCamera(i)->setGraphicsContext(gw);
return gw;
}
It seems to me that I understand this solution. I try it.
Thanks
Martin
-------- Original-Nachricht --------
> Datum: Fri, 05 Nov 2010 09:46:01 -0400
> Von: "Jean-Sébastien Guay" <[email protected]>
> An: OpenSceneGraph Users <[email protected]>
> Betreff: Re: [osg-users] How can I calculate a matrix via a MatrixManipulator
> Hello Martin,
>
> > I guess it wouldn't work, because I use the
> setUpViewerAsEmbeddedInWindow(...)-Method of the osgViewer::Viewer. The
> composite viewer don't have
> this function.
>
> But that method is not "magical", you can just copy the code from it and
> do it yourself. All it does AFAIK is create a GraphicsWindowEmbedded and
> set it on the Viewer's camera. Just do the same, but create your
> osgViewer::Views and set the context on each of those views' cameras.
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay [email protected]
> http://www.cm-labs.com/
> http://whitestar02.webhop.org/
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org