OcclusionQueryNode: ensure a valid query geometry
If the query geometry is invalid then don't do any occlusion queries and never traverse the subgraphs.
This commit is contained in:
parent
c64b94da2e
commit
3ef5d2b331
@ -483,6 +483,14 @@ bool OcclusionQueryNode::getPassed( const Camera* camera, NodeVisitor& nv )
|
|||||||
return _passed;
|
return _passed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !_validQueryGeometry )
|
||||||
|
{
|
||||||
|
// The box of the query geometry is invalid, return false to not traverse
|
||||||
|
// the subgraphs.
|
||||||
|
_passed = false;
|
||||||
|
return _passed;
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// Two situations where we want to simply do a regular traversal:
|
// Two situations where we want to simply do a regular traversal:
|
||||||
// 1) it's the first frame for this camera
|
// 1) it's the first frame for this camera
|
||||||
|
Loading…
Reference in New Issue
Block a user