Hi Mike,

On 12/6/06, Mike Wittman <[EMAIL PROTECTED]> wrote:
Hi Zach,

Are you setting the graphics context ID when you create your viewer?  I
was observing similar symptoms until I explicitly did so.  I just added
this line after SceneView creation:

sceneView->getState()->setContextID(osg::GraphicsContext::createNewConte
xtID());

This will work around the problem but not solve it.

These two methods in SceneView are what you need to call.

       /** Release all OpenGL objects from the scene graph, such as
texture objects, display lists etc.
         * These released scene graphs placed in the respective
delete GLObjects cache, which
         * then need to be deleted in OpenGL by
SceneView::flushAllDeleteGLObjects(). */
       virtual void releaseAllGLObjects();

       /** Flush all deleted OpenGL objects, such as texture objects,
display lists etc.*/
       virtual void flushAllDeletedGLObjects();

osgProducer::Viewer should call these if one calls :

 viewer.sync();
 viewer.cleanup_frame();

Before you close down the viewers render surfaces.  The osgviewer
example does this just after the exit of the main loop.

A quick glance at the code now suggests that this is all that one
should need to, it should then be perfectly ok to re-create the
graphics windows afterwards.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to