I've found a solution to avoid the display to be freezed, in the OnIdle()
function I have to call wxGLCanvas::SetCurrent() before calling osgViewer::
frame()...

2007/8/1, amalric alexandre <[EMAIL PROTECTED]>:
>
> Hi osg-users,
>
> I've noticed something strange using the osgViewerWX example on OSG 2.0, I
> wanted to create 2 main frames with 2 osgViewer, so I made a copy of the
> code in the function OnInit() creating an another MainFrame,
> GraphicsWindowWX, osgViewer and so on ...
>
> Everything compile fine but nothing is displayed in the second frame and
> the first one is freezed.
>
> An another strange thing (ine the original example), is that in the
> GraphicsWindowWX constructor, I pass an wxSize(800,600) and the same is set
> in the viewport but the frame displayed don't fit this size...
>
> I made a little application in wich each MDIChild has an osgViewer, and I
> want to call the osgViwer::frame() function in the wxMDIChildFrame::OnIdle()
> function but when I have more than one child, the display freeze on the
> first and when I destroy the first the second one freeze. I don't undestand
> why cause the OnIdle() function is really called for each child.
>
> I made another test not using OnIdle() function, with a wxThread calling
> frame(), but I have a bug on resize, the osgViewer do not always fit the
> size of the wxGLCanvas with correct parameters. I'm a little bit lost...
>
> So if someone has the answer I will be very grateful ;-)
>
> Thanks, Alex
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to