Hi Daniel, Could you code up an example, such as by extending the exiting QT example, as I really can't guess at what might be up when so many odd things are being done.
Robert. On 6/28/07, Kallfass, Daniel, SDGE1 <[EMAIL PROTECTED]> wrote:
Hi Robert, I have already tried to call setUpRenderingSupport but without success. I am only using one slave camera at a time. At application runtime the slave camera is removed and a new camera is created with a new graphic context. The reason for that is that I have integrated OSG into QT4 and when I embed the OSGQtWidget into a new parent window at runtime, the existing window- and HDC-handles are deleted by QT and new are created. So the current OpenGL context gets invalid as well. So I try to delete the old osg graphic context and slave camera as well and create a new graphic context and assign it to a new slave camera. Thanks, Daniel -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, June 28, 2007 1:44 PM To: osg users Subject: Re: [osg-users] Problem with dynamic creation of slave cameras inosgViewer HI Daniel, You'll need to call Viewer::setUpRenderingSupport() to that the new slave can work. BTW, why are you creating/adding slaves on the fly? How many slaves do you have? Robert. On 6/28/07, Kallfass, Daniel, SDGE1 <[EMAIL PROTECTED]> wrote: > Hello, > > I am using osgViewer::Viewer from OSG 2.0and try do remove and create a new slave camera with a new GraphicsWindowWin32 during runtime. > > Here is the example code: > _osgviewer->removeSlave(0); > _camera = new osg::Camera(); > _camera->setGraphicsContext( myNewGraphicsWindowWin32 ); > _osgviewer->addSlave(_camera.get()); > > The new GraphicsContext is created successfully but the scene displayed looses all its textures and most of its geometry. Nodes that are loaded AFTER creating the new camera are displayed correctly. > > What could be the problem here? One idea might be that the OSG contextID is handled incorrectly at GraphicsWindowWin32 (I use a GraphicsWindow32 which is initialized with inheritedWindowData and setInheritedWindowPixelFormat) > > Thanks, > > Daniel > > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
