Ejemplo n.º 1
0
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 );
}
Ejemplo n.º 2
0
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 );
}