Hello Carsten,
thanks for both patches I'll test them. Would be please post the second
patch on list?
Thanks,
Michael
Am 02.07.2010 21:28, schrieb Carsten Neumann:
> Hello Michael,
>
> Carsten Neumann wrote:
>
>> Michael Raab wrote:
>>
>>> What do think when and where exactly I should call setEnabled(false) on FBO?
>>>
>> hm, good question. A fairly hacky approach would be to do it after the
>> first frame is rendered - at that point all the viewports should be
>> synced to the servers so you can iterate over them and disable those
>> that are not relevant for each node. Not a very nice solution, but I
>> can't really think of something better at the moment.
>>
> to make this approach a bit more feasible I added
> ClusterServer::getServerId(). With that you can iterate over the
> viewports and depending on the server id disable those that you don't
> need/want on each node.
>
> Something like this (not tested) should probably do it:
>
> ClusterServer *server;
> bool firstFrame = true;
>
> void display(void)
> {
> server->doSync(false);
>
> if(firstFrame == true)
> {
> firstFrame = false;
>
> UInt32 serverId = server->getServerId();
> WindowPtr serverWin = server->getServerWindow();
>
> for(UInt32 i = 0; i< serverWin->getMFPort()->size(); ++i)
> {
> ViewportPtr serverPort = serverWin->getPort(i);
> FBOViewportPtr serverFBOPort = FBOViewportPtr::dcast(serverPort);
>
> if(serverFBOPort != NullFC&&
> i != serverId * 3&&
> i != serverId * 3 + 1 )
> {
> serverFBOPort->setEnabled(false);
> }
> }
> }
>
> server->doRender(ract);
> server->doSwap();
> }
>
> Cheers,
> Carsten
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users