[osg-users] databasepageloader and composite viewer
David _
solid_davidian at hotmail.com
Tue Nov 6 04:15:23 PST 2007
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: robert.osfield at gmail.com
> To: osg-users at 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 _ <solid_davidian at hotmail.com> 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: robert.osfield at gmail.com
> > > To: osg-users at 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 _ <solid_davidian at hotmail.com> 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 at lists.openscenegraph.org
> > > >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >
> > > >
> > > _______________________________________________
> > > osg-users mailing list
> > > osg-users at 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 at lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071106/eb9cf933/attachment-0001.html
More information about the osg-users
mailing list