|
openscenegraph
|
#include <DatabasePager>
Classes | |
| class | DatabaseThread |
| struct | PagedLODList |
| struct | DatabaseRequest |
| struct | RequestQueue |
| struct | ReadQueue |
Public Types | |
| enum | DrawablePolicy { DO_NOT_MODIFY_DRAWABLE_SETTINGS , USE_DISPLAY_LISTS , USE_VERTEX_BUFFER_OBJECTS , USE_VERTEX_ARRAYS } |
| typedef OpenThreads::Thread::ThreadPriority | ThreadPriority |
| typedef std::set< osg::ref_ptr< osg::StateSet > > | StateSetList |
| typedef std::vector< osg::ref_ptr< osg::Drawable > > | DrawableList |
| typedef std::list< osg::ref_ptr< osg::Object > > | ObjectList |
Static Public Member Functions | |
| static osg::ref_ptr< DatabasePager > & | prototype () |
| static DatabasePager * | create () |
| Static Public Member Functions inherited from osg::Referenced | |
| static OpenThreads::Mutex * | getGlobalReferencedMutex () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| static DeleteHandler * | getDeleteHandler () |
Protected Types | |
| typedef std::vector< osg::ref_ptr< DatabaseThread > > | DatabaseThreadList |
Protected Member Functions | |
| virtual | ~DatabasePager () |
| void | compileCompleted (DatabaseRequest *databaseRequest) |
| virtual void | removeExpiredSubgraphs (const osg::FrameStamp &frameStamp) |
| void | addLoadedDataToSceneGraph (const osg::FrameStamp &frameStamp) |
| Protected Member Functions inherited from osg::NodeVisitor::DatabaseRequestHandler | |
| virtual | ~DatabaseRequestHandler () |
| Protected Member Functions inherited from osg::Referenced | |
| virtual | ~Referenced () |
| void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
| void | deleteUsingDeleteHandler () const |
Friends | |
| class | DatabaseThread |
| struct | DatabaseRequest |
| class | FindCompileableGLObjectsVisitor |
| struct | DatabasePagerCompileCompletedCallback |
| class | FindPagedLODsVisitor |
| struct | SortFileRequestFunctor |
Database paging class which manages the loading of files in a background thread, and synchronizing of loaded models with the main scene graph.
|
protected |
| typedef std::vector< osg::ref_ptr<osg::Drawable> > osgDB::DatabasePager::DrawableList |
| typedef std::list< osg::ref_ptr<osg::Object> > osgDB::DatabasePager::ObjectList |
| typedef std::set< osg::ref_ptr<osg::StateSet> > osgDB::DatabasePager::StateSetList |
| osgDB::DatabasePager::DatabasePager | ( | ) |
| osgDB::DatabasePager::DatabasePager | ( | const DatabasePager & | rhs | ) |
References DatabasePager().
|
protectedvirtual |
|
virtual |
|
protected |
Add the loaded data to the scene graph.
|
virtual |
Cancel the database pager thread(s).
|
inlinevirtual |
|
virtual |
Clear all internally cached structures.
|
inlinevirtual |
Create a shallow copy on the DatabasePager.
References DatabasePager().
|
protected |
|
static |
create a DatabasePager by cloning DatabasePager::prototype().
References DatabasePager().
|
inline |
Get whether new database request calls are accepted or ignored.
References _acceptNewRequests.
|
inline |
Get whether newly loaded textures should have a PixelBufferObject assigned to them.
References _assignPBOToImages.
|
inline |
Get the average time between the first request for a tile to be loaded and the time of its merge into the main scene graph.
References _numTilesMerges, and _totalTimeToMergeTiles.
|
inline |
Get whether the database pager thread should is paused or not.
References _databasePagerThreadPaused.
|
inline |
References _databaseThreads.
|
inline |
References _databaseThreads.
|
inline |
Report how many items are in the _dataToCompileList queue
References _dataToCompileList.
|
inline |
Report how many items are in the _dataToMergeList queue
References _dataToMergeList.
|
inline |
Get whether the removed subgraphs should be deleted in the database thread or not.
References _deleteRemovedSubgraphsInDatabaseThread.
|
inline |
Get whether the database pager should pre compile OpenGL objects before allowing them to be merged into the scene graph.
References _doPreCompile.
|
inline |
Get how loaded drawables should be handled w.r.t their display list/vertex buffer object/vertex array settings.
References _drawablePolicy.
|
inline |
Report how many items are in the _fileRequestList queue
References _fileRequestQueue, and _httpRequestQueue.
|
inline |
Get the incremental compile operation.
References _incrementalCompileOperation.
|
inline |
References _markerObject.
|
inline |
References _markerObject.
|
inline |
Set whether newly loaded textures should have their MaxAnisotopy set to a specified value.
References _changeAnisotropy, and _valueAnisotropy.
|
inline |
Get the maximum time between the first request for a tile to be loaded and the time of its merge into the main scene graph.
References _maximumTimeToMergeTile.
|
inline |
Get the minimum time between the first request for a tile to be loaded and the time of its merge into the main scene graph.
References _minimumTimeToMergeTile.
|
inline |
References _databaseThreads.
|
inline |
Get the number of frames that are currently active.
References _numFramesActive.
|
inline |
References _affinity.
|
inline |
References _affinity.
| bool osgDB::DatabasePager::getRequestsInProgress | ( | ) | const |
Report whether any requests are in the pager.
|
inline |
Get the target maximum number of PagedLOD to maintain in memory.
References _targetMaximumNumberOfPageLOD.
|
inline |
Get whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.
References _changeAutoUnRef, and _valueAutoUnRef.
|
virtual |
|
static |
get the prototype singleton used by DatabasePager::create().
|
virtual |
Find all PagedLOD nodes in a subgraph and register them with the DatabasePager so it can keep track of expired nodes. note, should be only be called from the update thread.
|
protectedvirtual |
Iterate through the active PagedLOD nodes children removing children which haven't been visited since specified expiryTime. note, should be only be called from the update thread.
|
virtual |
Add a request to load a node file to end the database request list.
Implements osg::NodeVisitor::DatabaseRequestHandler.
| bool osgDB::DatabasePager::requiresRedraw | ( | ) | const |
Return true if there are GL objects that need to be compiled by a draw traversal.
| bool osgDB::DatabasePager::requiresUpdateSceneGraph | ( | ) | const |
Return true if there are pending updates to the scene graph that require a call to updateSceneGraph(double).
| void osgDB::DatabasePager::resetStats | ( | ) |
Reset the Stats variables.
|
inline |
Set whether new database request calls are accepted or ignored.
References _acceptNewRequests.
|
inline |
Set whether newly loaded textures should have a PixelBufferObject assigned to them to aid download to the GPU.
References _assignPBOToImages.
| void osgDB::DatabasePager::setDatabasePagerThreadPause | ( | bool | pause | ) |
Set whether the database pager thread should be paused or not.
|
inline |
Set whether the removed subgraphs should be deleted in the database thread or not.
References _deleteRemovedSubgraphsInDatabaseThread.
|
inline |
Set whether the database pager should pre compile OpenGL objects before allowing them to be merged into the scene graph. Pre compilation helps reduce the chances of frame drops, but also slows the speed at which tiles are merged as they have to be compiled first.
References _doPreCompile.
|
inline |
Set how loaded drawables should be handled w.r.t their display list/vertex buffer object/vertex array settings.
References _drawablePolicy.
| void osgDB::DatabasePager::setIncrementalCompileOperation | ( | osgUtil::IncrementalCompileOperation * | ico | ) |
Set the incremental compile operation. Used to manage the OpenGL object compilation and merging of subgraphs in a way that avoids overloading the rendering of frame with too many new objects in one frame.
|
inline |
References _markerObject.
|
inline |
Set whether newly loaded textures should have their MaxAnisotopy set to a specified value.
References _changeAnisotropy, and _valueAnisotropy.
|
virtual |
| int osgDB::DatabasePager::setSchedulePriority | ( | OpenThreads::Thread::ThreadPriority | priority | ) |
Set the priority of the database pager thread(s).
|
inline |
Set the target maximum number of PagedLOD to maintain in memory. Note, if more than the target number are required for rendering of a frame then these active PagedLOD are excempt from being expiried. But once the number of active drops back below the target the inactive PagedLOD will be trimmed back to the target number.
References _targetMaximumNumberOfPageLOD.
|
inline |
Set whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.
References _changeAutoUnRef, and _valueAutoUnRef.
| void osgDB::DatabasePager::setUpThreads | ( | unsigned int | totalNumThreads = 2, |
| unsigned int | numHttpThreads = 1 ) |
|
virtual |
Signal the database thread that the update, cull and draw has begun for a new frame. Note, this is called by the application so that the database pager can go to sleep while the CPU is busy on the main rendering threads.
|
virtual |
Signal the database thread that the update, cull and draw dispatch has completed. Note, this is called by the application so that the database pager can go to wake back up now the main rendering threads are iddle waiting for the next frame.
|
virtual |
Merge the changes to the scene graph by calling calling removeExpiredSubgraphs then addLoadedDataToSceneGraph. Note, must only be called from single thread update phase.
|
friend |
References DatabasePagerCompileCompletedCallback, and FindPagedLODsVisitor.
Referenced by DatabasePagerCompileCompletedCallback, and FindCompileableGLObjectsVisitor.
|
friend |
|
friend |
|
friend |
References DatabasePagerCompileCompletedCallback, and FindCompileableGLObjectsVisitor.
Referenced by FindCompileableGLObjectsVisitor.
|
friend |
References FindPagedLODsVisitor, and SortFileRequestFunctor.
Referenced by DatabasePagerCompileCompletedCallback, and FindPagedLODsVisitor.
|
friend |
References SortFileRequestFunctor.
Referenced by FindPagedLODsVisitor, and SortFileRequestFunctor.
|
protected |
Referenced by getAcceptNewDatabaseRequests(), and setAcceptNewDatabaseRequests().
|
protected |
|
protected |
Referenced by getProcessorAffinity(), and getProcessorAffinity().
|
protected |
Referenced by getApplyPBOToImages(), and setApplyPBOToImages().
|
protected |
Referenced by getMaxAnisotropyPolicy(), and setMaxAnisotropyPolicy().
|
protected |
Referenced by getUnrefImageDataAfterApplyPolicy(), and setUnrefImageDataAfterApplyPolicy().
|
protected |
Referenced by getDatabasePagerThreadPause().
|
protected |
Referenced by getDatabaseThread(), getDatabaseThread(), and getNumDatabaseThreads().
|
protected |
Referenced by getDataToCompileListSize().
|
protected |
Referenced by getDataToMergeListSize().
|
protected |
|
protected |
|
protected |
Referenced by getDoPreCompile(), and setDoPreCompile().
|
protected |
|
protected |
Referenced by getDrawablePolicy(), and setDrawablePolicy().
|
protected |
Referenced by getFileRequestListSize().
|
protected |
|
protected |
Referenced by getFileRequestListSize().
|
protected |
Referenced by getIncrementalCompileOperation().
|
protected |
Referenced by getMarkerObject(), getMarkerObject(), and setMarkerObject().
|
protected |
Referenced by getMaximumTimeToMergeTile().
|
protected |
Referenced by getMinimumTimeToMergeTile().
|
protected |
Referenced by getNumFramesActive().
|
mutableprotected |
|
protected |
Referenced by getAverageTimeToMergeTiles().
|
protected |
|
protected |
|
protected |
Referenced by getTargetMaximumNumberOfPageLOD(), and setTargetMaximumNumberOfPageLOD().
|
protected |
Referenced by getAverageTimeToMergeTiles().
|
protected |
Referenced by getMaxAnisotropyPolicy(), and setMaxAnisotropyPolicy().
|
protected |
Referenced by getUnrefImageDataAfterApplyPolicy(), and setUnrefImageDataAfterApplyPolicy().