OcclusionQueryNode: add resetting of queries
If there's a big view change then it might not be appropriate to wait for '_queryFrameCount' till the next query is issued, because then geometry might pop into the view after '_queryFrameCount'. This is especially important for applications not having a constant frame rate, but just issue a new frame on demand.
This commit is contained in:
committed by
Robert Osfield
parent
e2fb88e187
commit
c8521068a5
@@ -588,6 +588,12 @@ void OcclusionQueryNode::setQueriesEnabled( bool enable )
|
||||
_enabled = enable;
|
||||
}
|
||||
|
||||
void OcclusionQueryNode::resetQueries()
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( _frameCountMutex );
|
||||
_frameCountMap.clear();
|
||||
}
|
||||
|
||||
// Should only be called outside of cull/draw. No thread issues.
|
||||
void OcclusionQueryNode::setDebugDisplay( bool debug )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user