Re: Chromium and VNC: remote rendering of desktop
Brian Paul <[email protected]>
| Newsgroups | gmane.comp.graphics.chromium.user |
|---|---|
| Message-ID | <[email protected]> |
Dan Phung wrote:
> Dan Phung wrote:
>> Brian Paul wrote:
>>
>>> Dan B. Phung wrote:
>>>
>>>> Brian Paul wrote:
>>>>
>>>>> Dan Phung wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I'm trying to get the setup where the local (app) node sends its
>>>>>> rendering data to a remote node to get rendered, and then sent
>>>>>> back to
>>>>>> get displayed. From what I've read, I should use the VNC SPU.
>>>>>>
>>>>> Do you want to use VNC?
>>>>>
>>>>> Or, are you trying to render back into the original application
>>>>> window?
>>>>>
>>>> I guess I don't really want to use VNC, but that's what I read as
>>>> one way of going about this...
>>>> but yes, I'm trying to render back to the original application window.
>>>>
>>> See the render SPU's 'render_to_app_window' option. I think there's
>>> at least one or two sample .conf files that use it.
>>>
>>> -Brian
>>>
>> I tried working from the rb.conf example and got something to
>> display...but I still don't have a complete understanding of the
>> correct way to do this. For clarity, what I'm trying to accomplish is
>> for the local application node to send off the 3d openGL rendering to
>> the server node, and having it drawn back locally on the application
>> node.
>> Here's my configuration:
>>
>> ----------------
>> import sys
>> sys.path.append( '../server' )
>> from mothership import *
>>
>> demo = crbindir+"/atlantis -s 100";
>>
>> server_spu = SPU( 'render' )
>> client_spu = SPU( 'pack' )
>> readback_spu = SPU( 'readback' )
>>
>> server_spu.Conf( 'window_geometry', [0, 0, 512, 192] )
>> server_spu.Conf( 'title', "server SPU" )
>> server_spu.Conf( 'swap_master_url', "" )
>> server_spu.Conf( 'render_to_app_window', 1 )
>> client_spu.Conf( 'draw_bbox', 1 )
>>
>> server_node = CRNetworkNode('remote_renderer')
>> server_node.AddSPU( server_spu )
>>
>> client_node = CRApplicationNode( )
>> client_node.AddSPU( readback_spu )
>> client_node.AddSPU( client_spu )
>> client_spu.AddServer( server_node, 'tcpip' )
>>
>> client_node.SetApplication( demo )
>> client_node.StartDir( crbindir )
>>
>> cr = CR()
>> cr.MTU( 1024*1024 )
>> cr.AddNode( client_node )
>> cr.AddNode( server_node )
>> cr.Go()
>> -----------------
>>
>> so with the 'render_to_app_window' line in, the crserver gives this
>> warning:
>> CR Warning(remote_renderer:30801): Render SPU:
>> render_to_app/crut_window
>> option is set but the window ID 0x1c00002 is invalid on the display
>> named :0.0.
>>
>> I had first tried this with the line 'server_spu.Conf(
>> 'render_to_app_window', 1 )'
>> commented out (as it is in the example) and it rendered in both the
>> server and
>> application node. I saw bandwidth usage go up, so that's how I know
>> that some
>> data is coming back from the server...but it looks the same on the
>> application
>> node with or without the render_to_app_window line in/out.
>> Lastly, I tried mucking around with the 'window_geometry', but
>> couldn't get the
>> atlantis example to draw correctly. It seems to be cut in half...
>>
>> thanks,
>> dan
>>
> arghh, sorry, I should've read the docs more, seems like what I want is
> to use: render_to_crut_window since the crserver doesn't have access to
> the original application window.
Try the attached example.
-Brian
-------------------------------------------------------------------------
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/
_______________________________________________
Chromium-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chromium-users
render_to_app_window.conf
(text/plain, 639 B)
# Example of rendering back into the application window, rather than a new
# render SPU window.
import sys
sys.path.append('../server')
from mothership import *
if len(sys.argv) < 2:
demo = "./city"
else:
demo = sys.argv[1]
render_spu = SPU('render')
render_spu.Conf('render_to_app_window', 1)
server_node = CRNetworkNode()
server_node.AddSPU(render_spu)
client_node = CRApplicationNode()
pack_spu = SPU('pack')
client_node.AddSPU(pack_spu)
pack_spu.AddServer(server_node, 'tcpip')
client_node.SetApplication(demo)
client_node.StartDir(crbindir)
cr = CR()
cr.MTU(10*1024)
cr.AddNode(client_node)
cr.AddNode(server_node)
cr.Go()