From d559ff91c3261d6a401fcd044f476ee83f3e7295 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 28 Aug 2003 21:40:23 +0000 Subject: [PATCH] Added getBound() to the database pager so that once a model has been loaded it bounding volume is computed upfront and in the database paging thread. --- src/osgDB/DatabasePager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osgDB/DatabasePager.cpp b/src/osgDB/DatabasePager.cpp index f41324197..39abdf159 100644 --- a/src/osgDB/DatabasePager.cpp +++ b/src/osgDB/DatabasePager.cpp @@ -230,6 +230,11 @@ void DatabasePager::run() if (databaseRequest->_loadedModel.valid() && !_activeGraphicsContexts.empty()) { + // force a compute of the loaded model's bounding volume, so that when the subgraph + // merged with the main scene graph and large computeBound() isn't incurred. + databaseRequest->_loadedModel->getBound(); + + ActiveGraphicsContexts::iterator itr = _activeGraphicsContexts.begin(); DataToCompile& dtc = databaseRequest->_dataToCompileMap[*itr];