100% right Robert, removing the scene data before closing the context solves the problem
The code above should help others having similar issue in the future... /adrian *************************** m_IWebaddon3D->getWebaddonRenderer()->getOSGViewer()->stopThreading(); if ( ! m_isFullScreen) { setupSlaves(); for (FullScreenSlaves::iterator it = m_FullScreenSlaves.begin();it!=m_FullScreenSlaves.end();it++){ osg::View::Slave &slave = m_IWebaddon3D->getWebaddonRenderer()->getOSGViewer()->getSlave(*it); slave._camera->removeChildren(0,slave._camera->getNumChildren()); slave._camera->addChild(m_IWebaddon3D->getWebaddonRenderer()->getOSGViewer()->getSceneData()); } } else { for (FullScreenSlaves::iterator it = m_FullScreenSlaves.begin();it!=m_FullScreenSlaves.end();it++){ osg::View::Slave &slave = m_IWebaddon3D->getWebaddonRenderer()->getOSGViewer()->getSlave(*it); slave._camera->removeChildren(0,slave._camera->getNumChildren()); m_IWebaddon3D->getWebaddonRenderer()->getOSGViewer()->removeSlave(*it); } m_FullScreenSlaves.clear(); SAFE_FREE_REF(m_GraphicsContext_FullScreen); } m_isFullScreen = ! m_isFullScreen; m_doToogleFullScreen = false; m_IWebaddon3D->getWebaddonRenderer()->getOSGViewer()->updateSlaves(); m_IWebaddon3D->getWebaddonRenderer()->getOSGViewer()->startThreading(); 2009/1/21 Robert Osfield <robert.osfi...@gmail.com> > Hi Adrian, > > The problem might well be that the outgoing context is cleaning up > it's scene graph and associated OpenGL without know that they are > shared. You could remove the scene graph from the associated camera > before closing it to prevent the graphics window automatically cleanly > up all associate OpenGL objects. > > Robert. > > On Wed, Jan 21, 2009 at 4:14 PM, Adrian Egli OpenSceneGraph (3D) > <3dh...@gmail.com> wrote: > > Thanks for the replay, but i can not find any topic corresponding this > > contex. I don't know what's going wrong, but > > if i share an openGL context, say from my master camera and then i > suddenly > > like to close a slave cam, i shouldn't > > close the shared context. because i still have the current context in > use, > > right? It doesn't delete the master's context, but > > i loose the textures, may this is what your like to give as hint. but i > am > > not sure whether it removes the textures only. > > > > /adrian > > > > 2009/1/21 Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com> > >> > >> Hi Adrian, > >> > >>> i share the context, when i remove the slave, i will loose all textures > >>> (:-)) > >> > >> This has been discussed a lot in the past, search the archives. Hint: > >> disable "unref textures on apply". > >> > >> Hope this helps, > >> > >> J-S > >> -- > >> ______________________________________________________ > >> Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com > >> http://www.cm-labs.com/ > >> http://whitestar02.webhop.org/ > >> _______________________________________________ > >> osg-users mailing list > >> osg-users@lists.openscenegraph.org > >> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > > -- > > ******************************************** > > Adrian Egli > > > > _______________________________________________ > > 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 > -- ******************************************** Adrian Egli
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org