Hi,

I have a cluster setup  based on the MultiWindow class. The servers do
render loaded models finde, but I can't get the PassiveWindow to render
as well. Depending on a switch the app decides wether to setup stand
alone or cluster mode, the code is given below.

If I run it with clustermode = false everything works fine as expected.
If I run it with clustermode = true the servers will render but on the
client I will just see the background color of the scene.

Thanks in advance!

Cheers,
Christoph

void MainWindow::initOSG( int argc, char **argv )
{
    bool clustermode = true;

    OSG::osgInit( argc, argv );

    OSG::ChangeList::setReadWriteDefault( true );

    OSG::MultiDisplayWindowRecPtr multiWindow;
    OSG::PassiveWindowRecPtr passiveWindow;

    sceneManager->renderWidget = ui.renderWidget;
    sceneManager->sceneTreeWidget = ui.treeWidgetScenegraph;

    passiveWindow = OSG::PassiveWindow::create();

    if ( clustermode )
    {
        // clear changelist from prototypes
        OSG::Thread::getCurrentChangeList()->clear();

        multiWindow = OSG::MultiDisplayWindow::create();

        sceneManager->setWindow( multiWindow );

        multiWindow->editMFServers()->push_back( "192.168.0.101" );
        multiWindow->editMFServers()->push_back( "192.168.0.102" );

        multiWindow->setClientWindow( passiveWindow );       
    }
    else
        sceneManager->setWindow( passiveWindow );

    OSG::NodeRecPtr modelRoot = ModelManager::the()->getModelRoot();
    sceneManager->setRoot( modelRoot );
    sceneManager->showAll();

    // If clustermode, init the multiwindow
    if ( clustermode )
    {
        multiWindow->init();
    }

    OSG::commitChanges();       
}

------------------------------------------------------------------------------

_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to