Hi Simon, I would like to see osgWidget be generalized to work in 3D, I haven't had the change yet to dive in and use osgWidget actively yet, so haven't got grips with the code base yet, it's something I have planned, but it'll have to wait to after 2.10 is out, which takes us into August.
In the meantime perhaps you could try rendering the GUI to a texture rather than a HUD, and then apply this texture to a QUAD that you position in the 3D scene. You'd need to remap the mouse coordinates into from the 3D coords into the coords of the GUI texture using a technique such as I used for the osgWidget::PdfReader, VncClient and Brower classes, these all utilize the osgViewer::InteractiveImageHandler to do the reprojection of coordinates. Robert. On Wed, Jul 1, 2009 at 9:28 AM, Simon Notheis<[email protected]> wrote: > Hi again, > > I would like to know, if anyone is placing buttons or menus into a 3D > scene. Of course that wasn't the original purpose of osgWidget, but > since there are many nice functionalities like the mouse callbacks, it > seems worth trying instead of implementing some own picking based 3D > GUI. I played around with it, and after some adjustments (RenderBins, > PolygonOffset for label's osgText and background) it looks quite fine, > but especially with menus/submenus (which I took from the osgwidgetmenu > example) I experienced some problems. > > Actually I want the widgets/windows to be managed by the WindowManager > so I have all the mouse interaction stuff. Problem is that I don't want > to add them to the WindowManager as child nodes because that would mean > that they would be drawn, but I need them in my regular scene camera, > not the ortho cam of the WindowManager. But there's obviously a strong > connection between the managing and drawing functionality of the > WindowManager. > > I just would like to know, if anyone is or would be using 3d widgets at > all and found a "clean" way to do that, because sometimes I still get > strange behaviours e.g. when removing and re-adding windows with > submenus or something like that. > > And btw... perhaps some things would be a bit easier making more > functions of the WindowManager virtual, so that we can do some "good > hacks" instead of "bad hacks" if necessary :-) > > Best regards, > Simon > > -- > ___________________________________ > / \ > | Dipl.-Inform. Simon Notheis \________________________ > | | \ > | Institut für Prozessrechentechnik, | Gebäude 40.28, Zi. 109 | > | Automation und Robotik (IPR) | Engler-Bunte-Ring 8 | > | Universität Karlsruhe (TH) | D-76131 Karlsruhe | > | | | > | http://wwwipr.ira.uka.de/~notheis | Telefon: 0721-608 5442 | > | http://wwwipr.ira.uka.de/~iirob | Fax: 0721-608 7141 | > \____________________________________|________________________/ > _______________________________________________ > 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

