Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Robert Osfield
Hi Adrian, If you want to add and remove slaves from a view at runtime you will need to stop the threading of the viewer via viewer.stopThreading(), then add/removeSlave() call realize on any new graphics contexts then call startThreading(); Robert. On Wed, Jan 21, 2009 at 7:27 AM, Adrian Egli

Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Adrian Egli OpenSceneGraph (3D)
Thanks a lot /adrian 2009/1/21 Robert Osfield robert.osfi...@gmail.com Hi Adrian, If you want to add and remove slaves from a view at runtime you will need to stop the threading of the viewer via viewer.stopThreading(), then add/removeSlave() call realize on any new graphics contexts then

Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Adrian Egli OpenSceneGraph (3D)
osg::ref_ptrosg::GraphicsContext::Traits traits = new osg::GraphicsContext::Traits; traits-hostName = si.hostName; traits-displayNum = si.displayNum; traits-screenNum = si.screenNum; traits-x = 0; traits-y = 0; traits-width = width; traits-height = height;

Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Jean-Sébastien Guay
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

Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Adrian Egli OpenSceneGraph (3D)
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

Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Robert Osfield
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

Re: [osg-users] Add / Remove Slave

2009-01-21 Thread Adrian Egli OpenSceneGraph (3D)
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 ( !