Hi Robert,
Moving on the lines you had suggested, I have now been able to get a
working MFC MDI Application with osgViewer::CompositeViewer. But there is an
observation on this issue. The application I am developing requires a window to
be dynamically opened / closed. The CompositeViewer class is expecting all the
Views to be added before a call to frame() is made. If I make a call to
osgViewer::CompositeViewer::frame(), then add a view using
osgViewer::CompositeViewer::addView(), and again call frame(), the program
hangs. Debugging, I found that this happens in
osgViewer::renderingTraversal()
....
if ( _startRenderingBarrier.valid())
_startRenderingBarrier->block();
The debugger gives the message: "This process seems to be deadlocked".
I don't know if it is a bug or if the class is not supposed to be used in
this manner. Please Help.
Thanks in Advance.
Regards
Harash.
Robert Osfield <[EMAIL PROTECTED]> wrote:
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/
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
---------------------------------
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta._______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
---------------------------------
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta._______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/