Hi David,

There a few too many parts in this set up for me to fully understand
the ins and outs to it I'm afraid.  W.r.t. memory one needs to be
careful about ciruclar references i.e. the window owning the viewer vs
viewer owning the window.  Having the GraphicsWindowWx be handled as a
proxy object might be the best way to tackle this, with the WxWidget
owning the GraphicsWindowWx and the Viewer's Camera owning
GraphicsWindowWx, if the WxWidget goes out of scope then the
GraphicsWindowWx wouldn't but would need to be switched off.

Robert.

On Nov 6, 2007 12:15 PM, David _ <[EMAIL PROTECTED]> wrote:
>
>  Hi Robert,
>
> i´ll explaing the process we´re following and maybe you can see if we´re
> doing something wrong
>
> we´re using wxwidgets to manage the windows system which is composed by a
> MDI parent frame and many MDI child frames which all share the same parent
> frame.
>
> each MDI child frame (which is itself a new window) has it´s own openGL
> canvas and it´s own osgViewer. We also have one global compositeViewer for
> the whole application.
>
> the process we follow for creating each MDI Child Window is, create the new
> frame, create the new openglcanvas inside the new frame, create a new
> osgviewer, associate the osgviewer with the canvas using
> osg_viewer->getCamera()->setGraphicsContext(gl_canvas);, call the SetScene
> method of the viewer to tell him which scene is going to be shown and
> finally we call the addView method of the compositeViewer passing the new *
> viewer as a parameter
>
> for deleting the window we first use the
> composite_viewer->removeView(viewer) and then we delete the wxWidgets stuff,
> no direct calls to the viewer destructor is used. Does the remoview kills
> the viewer??? we believe it does because we see no memory leaks when the
> application closes. we´re not using a ref_ptr in the viewer because we had
> some problems with the deleting order of the widgets, we´ll try to find a
> way to use it and maybe it helps a little
>
> if you see something which you think is not right, please tell us
>
> > Date: Tue, 6 Nov 2007 11:20:57 +0000
>
>
> > From: [EMAIL PROTECTED]
> > To: osg-users@lists.openscenegraph.org
> > Subject: Re: [osg-users] databasepageloader and composite viewer
> >
> > Hi David,
> >
> > I've had a quick check through View.cpp and the destructor doesn't do
> > anything more than unref the Scene object that should be shared
> > between each of your views, and as such shouldn't actually do anything
> > to the DatabasePager directly. The same goes for
> > CompositeViewer::removeView, it shouldn't change anything with the
> > database pager directly.
> >
> > Do each of the View have their own GraphicsWindow? I wonder if this
> > is where the problems stem from.
> >
> > Robert.
> >
> > On Nov 6, 2007 11:12 AM, David _ <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi Robert
> > >
> > > we´re currently using OSG 2.2 under windows compiled with visual studio
> 2005
> > >
> > >
> > > > Date: Tue, 6 Nov 2007 09:01:07 +0000
> > > > From: [EMAIL PROTECTED]
> > > > To: osg-users@lists.openscenegraph.org
> > > > Subject: Re: [osg-users] databasepageloader and composite viewer
> > >
> > >
> > > >
> > > > Hi David,
> > > >
> > > > Which version of the OSG are you using?
> > > >
> > > > Robert.
> > > >
> > > > On Nov 5, 2007 9:40 AM, David _ <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Hi
> > > > >
> > > > > We´re dealing with a MDI application with multiple views of the same
> > > scene,
> > > > > which is composed by some pagelod islands.
> > > > >
> > > > > we´re using the composite viewer in order to have an independent
> camera
> > > in
> > > > > every child window and it´s working fine. The problem comes when we
> want
> > > to
> > > > > delete one of these windows.
> > > > >
> > > > > For deleting a view we use the removeView method of the composite
> viewer
> > > in
> > > > > order to free the osgViewer, but, sometimes it kills the
> > > databasepageloader
> > > > > too which stops all the LOD switching stuff. This is not happening
> all
> > > the
> > > > > viewers, just with some of them.
> > > > >
> > > > > How can we avoid this (killing a view of the composite viewer
> without
> > > > > killing the LOD stuff)???
> > > > > How can we check if the databasepageloader is gone and re-start it??
> > > > >
> > > > > thanks in advance
> > > > >
> > > > > help would be really appreciated
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > Express yourself instantly with MSN Messenger! MSN Messenger
> > > > >
> > > > > _______________________________________________
> > > > > osg-users mailing list
> > > > > osg-users@lists.openscenegraph.org
> > > > >
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > > >
> > > > >
> > > > _______________________________________________
> > > > osg-users mailing list
> > > > osg-users@lists.openscenegraph.org
> > > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > > ________________________________
> > > Express yourself instantly with MSN Messenger! MSN Messenger
> > > _______________________________________________
> > > osg-users mailing list
> > > osg-users@lists.openscenegraph.org
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > >
> > _______________________________________________
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> ________________________________
> Express yourself instantly with MSN Messenger! MSN Messenger
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to