Moved the compile to after the updateSceneView

This commit is contained in:
Robert Osfield
2008-05-20 09:28:44 +00:00
parent 24fec21002
commit 100cc12ecb

View File

@@ -453,24 +453,25 @@ void Renderer::cull_draw()
osgUtil::SceneView* sceneView = _sceneView[0].get();
if (!sceneView || _done) return;
if (_done)
{
osg::notify(osg::INFO)<<"Render::release() causing cull_draw to exit"<<std::endl;
return;
}
updateSceneView(sceneView);
if (_compileOnNextDraw)
{
compile();
}
updateSceneView(sceneView);
osgViewer::View* view = dynamic_cast<osgViewer::View*>(_camera->getView());
osgDB::DatabasePager* databasePager = view ? view->getDatabasePager() : 0;
osg::GraphicsContext* compileContext = osg::GraphicsContext::getCompileContext(sceneView->getState()->getContextID());
osg::GraphicsThread* compileThread = compileContext ? compileContext->getGraphicsThread() : 0;
if (_done)
{
osg::notify(osg::INFO)<<"Render::release() causing cull_draw to exit"<<std::endl;
return;
}
// osg::notify(osg::NOTICE)<<"RenderingOperation"<<std::endl;