Hi Martin,
Martin Karlsson wrote:
> Hi Dirk!
>
> I'm not sure i understand how I'm supposed to get the changelists to the
> servers. Since the servers (used the tutorial file 12ClusterServer) are
> started externally and on different computers, and they don't have any
> other functions to access the server other than:
in a previous mail you have written that your tutorial with
MultiDisplayWindow shows the initial scene, but not the modifications
done later. This means that modifications done in the main thread are
transfered to the servers, because they are in the ChangeList for the
same thread the MDW is using.
The changes in the "foo" thread however are only applied to the the main
thread - this does *not* add the changes themselves to the main threads
ChangeList (this is what Dirk meant, when he said ChangeList application
is not transitive).
Now to get your program working you need to get the changes from the
"foo" thread into the main threads ChangeList (because this ChangeList
is distributed to the servers by MDW). You can do this, by calling:
Thread::getCurrentChangeList()->merge(*thread->getChangeList())
This should go into your display function, which would then look like this:
// redraw the window
void display(void)
{
if (needSync==true)
{
needSync=false;
syncBarrier->enter(2);
Thread::getCurrentChangeList()->merge(*thread->getChangeList())
thread->getChangeList()->applyAndClear();
syncBarrier->enter(2);
}
mgr->redraw();
}
Please note that I don't have a cluster here, so I could not test this,
sorry.
Hope it helps,
Carsten
> void start ( void );
> void stop ( void );
> void render ( RenderActionBase *action );
> void doSync ( bool applyToChangelist );
> void doRender ( RenderActionBase *action );
> void doSwap ( void );
>
> I tried the doSync function (after the line: server->start()), I don't
> really know what it does, but it froze the servers. How to handle that
> function?
>
> The client don't have any reference to the servers other than
> mwin->getServers(). And i don't know how I could use that data i get by
> calling that function. I hoped for that I could access the
> server-objects from that function, but it seams like that's not possible?
>
> What I'm trying to do is:
> one client on one computer - manipulate the scene during execution
>
> any number of computers that each starts a server that render the scene.
> These servers are another program, in this case the tutorial file
> 12ClusterServer. These servers should update their scene when the client
> does it's own update.
>
> Many Thanks!
> // Martin
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users