Hi Harash,

On 5/8/07, Harash Sharma <[EMAIL PROTECTED]> wrote:

    As you had suggested, I tried creating the osgViewer::CompositeViewer
object and to it attached the osgViewer::View. Further, as shown in
osgMultipleCameras example, the traits structure was filled accordingly. The
problem I am now facing is how to attach the MFC Window to the
GraphicsContext / osgViewer. OSGMFC achieved this by passing the window
handle using GetSafeHwnd() to Producer::RenderSurface. But I could not
locate a mechanism of passing any such information to the osgViewer::View or
CompositeViewer or Viewer. One Win32WindowingSystemInterface class  I could
locate, but there too I could not find a way out.


I don't have the code to hand, but if your browse through the  osg-users
email archives for the last week you'll see how to use the
osg::GraphicsContext::Traits::inheritedWindowData  set to
osgViewer::GraphicsWindowWin32::WindowData(hwnd)  to tell the viewer to
realize a window adopting the passed in window.  The approach is roughly the
same as done in Producer::RenderSurface previous, only the architecture is a
bit different in osgViewer.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to