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
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
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;
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
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
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
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 ( !
7 matches
Mail list logo