On Mon, 2008-04-21 at 20:17 +0100, Robert Osfield wrote:
> Hi Robert,
> 
> Nicolas nicely sumerised what I normally write in a couple of hundred
> lines, in your case you certainly have multiple independent views -
> the main view and the HUD view are conceptually different, so
> naturally these would lead to your suggestion 3 - i.e. using
> CompositeViewer.
> 
> In the case of HUD's you can just be a bit more lazy and treat the HUD
> as just an overlay and not really a full view in its own right - so
> conceptually you'd tell yourself you have one main view and just a bit
> of decoration on top, in which case you make an excuse for using a
> slave camera and use a standard Viewer.  Viewer is only slightly more
> straight forward to work with than CompositeViewer so that there isn't
> really much to gain from this.
> 
> Personally I would not recommend stick a HUD into a scene graph any
> more, as conceptually it's harder to claim that a HUD is part of the
> scene, however, there are some cases where you might actually want a

This raises an interesting question, Robert. osgWidget can easily use
Viewer or CompositeViewer (it really just needs an osgViewer::View* for
computeIntersections()), but throughout the examples and whatnot I
normally just use a standard Viewer. Should I begin encouraging use of
CompositeViewer instead, just as a kind of "good development practice"
thing?

> HUD saved and loaded along with the rest of the scene graph, so again
> here you might want to bend the rules a little ;-)

I'm currently implementing DotOsgWrapper proxy objects for all of
osgWidget. I'm not pretending this will act as a fully-serialized "state
dump" of an interface at any given time, but it will at least allow you
to dump some semblance of your UI and view it in text form--or even load
it in a perspective view to see how Windows and whatnot are layered...

> Since there is the same Camera setup required for almost all of these
> configurations it's actually not too hard to jump from one set up to
> the next so if you do go down one route then decide against it it
> shouldn't be too hard to refactor.
> 
> Robert.
> 
> On Mon, Apr 21, 2008 at 5:35 PM, Robert Balfour <[EMAIL PROTECTED]> wrote:
> > My present osg app configuration is a single view on a single
> >  window/screen, with a hud camera overlay, which I simply added to the
> >  scenegraph with a high renderbin#.
> >
> >  Looking at osgHud example, it seems that this can also be configured by
> >  adding the hud camera as a slave cam to the view.  Or using Composite
> >  viewer, adding the hud cam as a second view.
> >
> >  Now if I go to reconfigure my app to work over two or more
> >  windows/screens, which approach would be better:
> >  (1)multiple cameras in the scenegraph,
> >  (2)slave cameras on a single view, or
> >  (3)multiple views (using composite viewer)?
> >
> >  I'm leaning towards (3).
> >
> >  Thanks.
> >
> >
> >  Bob.
> >  --
> >  Robert E. Balfour, Ph.D.
> >  Exec. V.P. & CTO,  BALFOUR Technologies LLC
> >  960 South Broadway, Suite 108, Hicksville NY 11801
> >  Phone: (516)513-0030  Fax: (516)513-0027  email: [EMAIL PROTECTED]
> >  _______________________________________________
> >  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
> 

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to