void RemoveQueries::apply( osg::Camera& node ) { osg::Camera::DrawCallback* cb = node.getPostDrawCallback(); CameraResetCallback* crc = dynamic_cast< CameraResetCallback* >( cb ); if( crc != NULL ) node.setPostDrawCallback( NULL ); traverse( node ); }
void AddQueries::apply( osg::Camera& node ) { if( node.getCullCallback() != NULL ) { traverse( node ); return; } CameraResetCallback* crc = new CameraResetCallback(); // TBD use the osgWorks composite post-draw callback. node.setPostDrawCallback( crc ); traverse( node ); }