Hello Johannes, On 11/22/2010 07:48 AM, Schaefer Johannes wrote: > i have wrote some code and record a video to demonstrate my problem. > The Video > http://dl.dropbox.com/u/9755257/IMG_0238.MOV > > In this video (sorry for the bad quality, i have no suitable screen > recorder), you can see two passive windows. On the left a torus and one > the right a box. I am changing the parameters of the box (x res, y res, > z res) and after some changes the right box disappears. After clicking > in the left passive window the torus also disappears. After some more > changes the right box appears and after clicking in the left passive > window there appears also a box. But there is no code that paints a box > in the left passive window. > I have no idea why this happens. > Here is a zip file with the source code.
ok, I could reproduce the problem. I believe it is caused by this: void makeTorus() { m_OSGWidget1->getManager()->setRoot(osg::makeTorus(t_ir, t_or, t_r, t_s)); m_OSGWidget1->getManager()->redraw(); m_OSGWidget1->repaint(); std::cout << "sharing 1: " << m_OSGWidget1->isSharing() << std::endl; } here you call the SSM redraw() function which will render the scene, but you call it from a function where you have no guarantee that any OpenGL context is active. Since the context is managed by Qt you can only issue OpenGL commands from those functions where Qt allows it - unless you have some means to make the right context active yourself, I don't know Qt's OpenGL support well enough to say if that is possible. Commenting the m_OSGWidget1->getManager()->redraw(); and the same in makeBox() solved the problem for me. Cheers, Carsten ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users