Ejemplo n.º 1
0
void ScreenMVCullVisitor::apply(osg::ClearNode& node)
{
    // simply override the current earth sky.
    if(node.getRequiresClear())
    {
        getCurrentRenderBin()->getStage()->setClearColor(node.getClearColor());
        getCurrentRenderBin()->getStage()->setClearMask(node.getClearMask());
    }
    else
    {
        // we have an earth sky implementation to do the work for us
        // so we don't need to clear.
        getCurrentRenderBin()->getStage()->setClearMask(0);
    }

    // push the node's state.
    StateSet* node_state = node.getStateSet();
    if(node_state)
        pushStateSet(node_state);

    handle_cull_callbacks_and_traverse(node);

    // pop the node's state off the render graph stack.    
    if(node_state)
        popStateSet();

}
Ejemplo n.º 2
0
// _clearMask
static bool checkClearMask( const osg::ClearNode& node )
{
    return node.getClearMask()!=(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
}