HI Rafa, On 9/17/07, Rafa Gaitan <[EMAIL PROTECTED]> wrote: > Node doesn't have a releaseAllGLObjects, and trying with > releaseGLObjects, doesn't work as I expect. Maybe I'm using > a bad approach to the problem! :(.
Sorry, viewer->releaseGLObjects(); Is the call I was thinking of. > releaseAllGLObjects method is only inside SceneView class > which is not easily accessible in the osgViewer::Viewer. You get get the SceneView via the Renderer object which is attached the Camera in 2.1.x. However, you shouldn't need it. All SceneView::releaseAllGLobjects() does is: void SceneView::releaseAllGLObjects() { if (!_camera) return; _camera->releaseGLObjects(_renderInfo.getState()); // we need to reset State as it keeps handles to Program objects. if (_renderInfo.getState()) _renderInfo.getState()->reset(); } And all SceneView::flushAllDeletedGLObjects() does is: void SceneView::flushAllDeletedGLObjects() { _requiresFlush = false; osg::flushAllDeletedGLObjects(getState()->getContextID()); } So you could try: viewer.getSceneData()->releaseGLObjects(); // or getCamera()... viewer.getCamera()->getGraphicsContext()->getState()->reset(); osg::flushAllDeletedGLObjects(0); _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org