Added DatabasePager::setUseFrameBlock(bool) method
This commit is contained in:
@@ -84,6 +84,16 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
||||
/** run does the database paging.*/
|
||||
virtual void run();
|
||||
|
||||
/** Set the use of the frame block which, if enabled, blocks the DatabasePager
|
||||
* from executing which the current frame is being drawn.
|
||||
* When a single processor machine is being used it can be useful to block on
|
||||
* frame to help prevent the database paging thread from slowing the cull and draw
|
||||
* traversals which in turn can cause frame drops.*/
|
||||
void setUseFrameBlock(bool useFrameBlock) { _useFrameBlock = useFrameBlock; }
|
||||
|
||||
/** Get the whether UseFrameBlock is on or off.*/
|
||||
bool getUseFrameBlock() const { return _useFrameBlock; }
|
||||
|
||||
|
||||
/** 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. */
|
||||
@@ -196,6 +206,7 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
||||
|
||||
virtual ~DatabasePager();
|
||||
|
||||
bool _useFrameBlock;
|
||||
osg::ref_ptr<Block> _frameBlock;
|
||||
int _frameNumber;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user