void MultiDisplayWindow::serverSwap(Window *window, UInt32 id)
{
    Connection *connection;

    // clear command buffers
    UInt8 pixel[3];
    glReadPixels(0,0,
                 1,1,
                 GL_RGB,GL_UNSIGNED_BYTE,
                 pixel);
    glFinish();

#if !FAST_SYNC
    connection=getNetwork()->getMainConnection();
    if(!getInterleave())
    {
        // tell client that we are finish
        connection->signal();
        // wait for swap
        connection->wait();
    }
#endif

    Inherited::serverSwap(window,id);
}
/*! render client window
 */
void MultiDisplayWindow::clientSwap( void )
{
    Connection *connection = getNetwork()->getMainConnection();

#if FAST_SYNC
    connection->selectChannel();
#else
    if(!getInterleave())
    {
        // wait for all servers to finish
        connection->wait();
        // initiate swap
        connection->signal();
    }
#endif

    // show client window
    Inherited::clientSwap();
}
Exemplo n.º 3
0
/*! render client window
 */
void MultiDisplayWindow::clientSwap( void )
{
    Connection *connection=getNetwork()->getMainConnection();

    if(getFastSync())
    {
        connection->selectChannel();
    }
    else
    {
        if(!getInterleave())
        {
            // wait for all servers to finish
            connection->wait();
            // initiate swap
            connection->signal();
        }
    }

    // show client window
    Inherited::clientSwap();
}