Hi Anders, I'm afraid the window handles differ in type across platforms so it's not possible to directly have a single cross platform handle.
There are methods in each the GraphicsWindow subclasses for getting the platform specific handles, but you'll need to cast and use the appropriate types/methods for each of these. Robert. On Tue, Jan 4, 2011 at 3:30 PM, Anders Backman <ande...@cs.umu.se> wrote: > Hi all. > I would like to get the window reference for all platforms using > osgViewer::Viewer. > I found the thread: > http://www.mail-archive.com/osg-users@openscenegraph.net/msg12957.html > Where I used this code for win32: > osgViewer::GraphicsWindowWin32* gw = > dynamic_cast<osgViewer::GraphicsWindowWin32*> ( > application->getViewer()->getCamera()->getGraphicsContext()); > > HWND hWnd = gw->getHWND(); > > But I cant find a way to get that under X11, (MacOS, Cocoo or whatever). > Is there a "portable" way of getting this reference? > /A > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org