Sure, which is what I did for Win32. But to what should I cast it in other cases? X11? There is only two relevant classes there: GraphicsWindow and GraphicsWindowWin32... I would have expected something like GraphicsWindowX11?
/A On Thu, Jan 6, 2011 at 12:24 PM, Robert Osfield <[email protected]>wrote: > 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 <[email protected]> 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/[email protected]/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 > > [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

