[osg-users] Gui widgets that expands on more views
Robert Osfield
robert.osfield at gmail.com
Sun Aug 18 05:39:16 PDT 2019
HI Noè.
You cold use a Camera draw callback to implement custom rendering.
Cheers,
Robert.
On Sat, 17 Aug 2019 at 17:00, Noè Murr <noe.murr at outlook.com> wrote:
> Hi Robert,
>
> Thank you for the answer. I like this method:
>
> "One way is to create a Camera (with otho projection) and subgraph to
> render the widgets and assign this Camera to the GraphicsWindow and set
> the Camera's RenderOrder so it get drawn last."
>
> As I have only to draw 2D widgets, can I create a fake camera that does
> not need the scene graph interface where I can draw directly in openGL?
>
> If I can, how should I do that?
>
> Cheers,
> Noè
>
> On 17/08/19 15:36, Robert Osfield wrote:
> > HI Noè,
> >
> > You can do an overall like this several ways. One way is to create a
> > Camera (with otho projection) and subgraph to render the widgets and
> > assign this Camera to the GraphicsWindow and set the Camera's
> > RenderOrder so it get drawn last. Another way is create another View
> > and then have this Camera below that.
> >
> > I think the osgsequence and osgtesselate examples illustrates this type
> > of usage case. Do a search for Camera in the examples should illuminate
> > other ways Camera's are used.
> >
> > To toggle on/off the widget overall simply set the Camera's NodeMask to
> > 0x0 for switching it off, and back to 0xffffffff (or any non zero should
> > also do) to switch it back on again.
> >
> > Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190818/e3d0fd0e/attachment.html>
More information about the osg-users
mailing list