Hi Serge,

On 5/10/07, Serge Lages <[EMAIL PROTECTED]> wrote:

I can't find how to retrieve the native window handler with osgViewer
(HWND pointer under Win32). The equivalent with osgProducer was :
Producer::Window wnd =
viewer->getCamera(0)->getRenderSurface()->getWindow();


You get the GraphicsContext from the viewer's camera and dyanmically cast
this to GraphicsWindowWin32 then access teh window handle from there.

i.e

 osgViewer::GraphcisWindowWin32* gw =
        dynamic_cast<osgViewer::GraphcisWindowWin32*> (
            viewer.getCamera()->getGraphicsContext());

 GWND hwnd = gw->getHWND();

The only but is... I have only just checked in the getHWND method, so svn
update :-)
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to