My quick fix is to clear the cache on the first render (and call clear 
thereafter).  OpenFlight files open and render fine now.  Is this a safe 
fix?

void ViewerBase::frame(double simulationTime)
{
    if (_done) return;

    // 
OSG_NOTICE<<std::endl<<"CompositeViewer::frame()"<<std::endl<<std::endl;

    if (_firstFrame)
    {
        viewerInit();

        if (!isRealized())
        {
            realize();
        }

        _firstFrame = false;
    }
    advance(simulationTime);

    eventTraversal();
    updateTraversal();
    renderingTraversals();

osgDB::Registry::instance()->clearObjectCache();  // ADDED TO CLEAR CACHE 
AFTER RENDER SINCE IT BECOMES CORRUPTED
}


-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/8a2ea36c-dee7-4600-88a1-cdcdc1b4da4b%40googlegroups.com.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to