Fixed relaseGLObjects() calls

This commit is contained in:
Robert Osfield 2018-06-27 09:06:58 +01:00
parent 9d897c2555
commit 27fc282bb5

View File

@ -711,13 +711,10 @@ void OcclusionQueryNode::createSupportNodes()
void OcclusionQueryNode::releaseGLObjects( State* state ) const
{
if(_queryGeode->getDrawable( 0 ) != NULL)
{
// Query object discard and deletion is handled by QueryGeometry support class.
OcclusionQueryNode* nonConstThis = const_cast< OcclusionQueryNode* >( this );
QueryGeometry* qg = static_cast< QueryGeometry* >( nonConstThis->_queryGeode->getDrawable( 0 ) );
qg->releaseGLObjects( state );
}
if (_queryGeode.valid()) _queryGeode->releaseGLObjects(state);
if (_debugGeode.valid()) _debugGeode->releaseGLObjects(state);
osg::Group::releaseGLObjects(state);
}
void OcclusionQueryNode::flushDeletedQueryObjects( unsigned int contextID, double currentTime, double& availableTime )