Dan,

Yes, you can do a picture in a picture. It's just another view in a
composite viewer that shares the same graphics context as the parent
view (i.e. the view that you're embedding into).
 
So, let's say viewA is the parent view created as usual with something
like setUpViewInWindow(...). Now you want to embed viewB into viewA.
This is done by

viewB->getCamera()->setViewport(x,y,w,h); // x,y referenced from LL
corner of parent window
viewB->getCamera()->setGraphicsContext(viewA->getCamera()->getGraphicsCo
ntext());

You can set the state and scenegraph for viewB just like any other view
that you want to render.

Hope this helps...
-Shayne

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Dan
Marshal
Sent: Sunday, August 19, 2012 11:56 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] window-in-window terrain view

Hi,

I am using OSG to create a simple flight sim app.  

I want to have a terrain 'window-in-window' to show the aircrafts path
over the earth.  

The terrain view would have its own coordinates.

Is there a simple way to create a view inside another view?

Thank you!

Cheers,
Dan

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49331#49331





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to