Hello Christoph,
Christoph Schäfer wrote:
> 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.
quick question: is there a call to PassiveWindow::init() somewhere? Is
the OpenGL context that is to be used by the PassiveWindow active at
that point?
> void MainWindow::initOSG( int argc, char **argv )
> {
> bool clustermode = true;
>
> OSG::osgInit( argc, argv );
>
> OSG::ChangeList::setReadWriteDefault( true );
^^^^
this should probably be done before osgInit, but it also is the default
with OpenSG 2.0 - I don't think this is related to your problem though.
> 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();
> }
Cheers,
Carsten
------------------------------------------------------------------------------
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users