[osg-users] Using osgViewer::GraphicsWindowEmbedded Was: Renderer and SceneView classes
robert.osfield at gmail.com
Mon Nov 9 09:31:58 PST 2009
Hi Doug and Paul,
On Mon, Nov 9, 2009 at 5:09 PM, Paul Martz <pmartz at skew-matrix.com> wrote:
> My understanding is that you create your own window and context, and make
> them current, then call setUpViewerAsEmbeddedInWindow. (Honestly, I'm not
> cure why osgViewer needs the window size passed as params; it seems like
> osgViewer could just query them from the window system. Maybe Robert can
The whole point of GraphicsWindowEmbedded is to hide the windowing
system support entirely from osgViewer, so it doesn't have any way
what so ever to query anything about the windowing system. Just like
SceneView you have to tell it the size of viewport/window etc.
> Second, what is the appropriate
>> way to handle multiple contexts with the GraphicsWindowEmbedded
> So, for example, your app opens multiple windows, each with their own
> context, say for a tiled display or CAVE... You only have one View (with
> multiple slave cameras) so it seems like this should work. Robert?
GraphicsWindowsEmbedded is suited for single context, single threaded
apps. If you want to multi-context apps then the way to do is to use
window inheritance feature of osgViewer::GraphicsWindow and inherit
your applications generated window. The osgviewerMFC and osgviewerWx
are examples that use GraphicsWindow inheritance.
More information about the osg-users