PDA

View Full Version : OpenGL Over a Network



summeus
05-19-2010, 10:37 AM
Is it possible to send OpenGL data over a network to be rendered on a remote computer?

If so, can you please point me in the right direction?

Thanks!

carsten neumann
05-19-2010, 01:16 PM
see http://chromium.sourceforge.net/

There are commercial implementations that do similar things, i.e. transport an OpenGL command stream over a network, but can't remember the names right now.
The X protocol can basically already do this, but you usually loose hardware acceleration.

There is also OpenSG (www.opensg.org (http://www.opensg.org)) an open source (LGPL) scene graph system that has cluster support and can distribute scenes (and updates to it) over the network to be rendered on remote machines (i'm one of the developers).

MaxH
05-19-2010, 03:35 PM
Sounds like you are thinking about generating images on your local computer and sending them over a network to another computer. I'm sure that's possible, though it may be slow. Another way to go is to write an OpenGL program that you distribute to remote users in advance. When it comes time to run, they startup the OGL app. which waits for data coming over the network (i.e. position, orientation of objects, etc.). We send data via UDP to other computers in the same room or across the country. It works quite well and isn't that hard to set up.

Dark Photon
05-20-2010, 06:57 AM
Is it possible to send OpenGL data over a network to be rendered on a remote computer?
One of the easiest ways:

ssh -X remotecomputer
run application

Alternatively:

log into remote computer
set DISPLAY env var to point back to local computer (e.g. mybox:0)
run application

This causes OpenGL to serialize OpenGL commands via the GLX protocol from the remotecomputer to the localcomputer, and uses it for display.

This is a UNIX / X Windows thing, but you can get X servers for Windows so you can use one of these things as a client and maybe a server. More detail: here (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=275410&Searchpa ge=1&Main=53109&Words=ssh&Search=true#Post275410), [url=http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=263905&Searchpa ge=1&Main=51098&Words=ssh&Search=true#Post263905]here[/url.

One issue is that (IIRC) not all OpenGL extensions have GLX protocol defined, so this may work for some apps and not others.

VirtualGL is another option. Search the archives for details.

Dark Photon
05-20-2010, 07:00 AM
The X protocol can basically already do this, but you usually loose hardware acceleration.
No, you don't lose hardware acceleration. What you lose is direct rendering (i.e. the "fast path" to the OpenGL driver that doesn't go through the X server).

GLX protocol is serialized so it can be sent over the network, received and routed through the X server to the OpenGL driver, at which point it is then hardware accelerated.

If you use primarily GPU-resident resources, remote rendering via GLX can be reasonably fast -- at least last time I used it. No reason to now because the days of "big iron" in the next room are dead for most folks.

summeus
05-20-2010, 08:49 AM
Sounds like you are thinking about generating images on your local computer and sending them over a network to another computer. I'm sure that's possible, though it may be slow. Another way to go is to write an OpenGL program that you distribute to remote users in advance. When it comes time to run, they startup the OGL app. which waits for data coming over the network (i.e. position, orientation of objects, etc.). We send data via UDP to other computers in the same room or across the country. It works quite well and isn't that hard to set up.

This is exactly what I want to do.

I'm using OpenGL inside of Pure Data and want to be able to transmit data from one computer running Pure Data to another. No need to worry about the specifics of using Pure Data, it supports all standard OpenGL code.

Can you tell me how I would go about sending and receiving data (position, orientation, etc.) with OpenGL?

Thanks!

MaxH
05-20-2010, 10:51 AM
This is exactly what I want to do.

I'm using OpenGL inside of Pure Data and want to be able to transmit data from one computer running Pure Data to another. No need to worry about the specifics of using Pure Data, it supports all standard OpenGL code.

Can you tell me how I would go about sending and receiving data (position, orientation, etc.) with OpenGL?

It's done through a sockets interface which allows character strings to be sent from one computer to another (via IP address). The graphics program is put into a listening mode where it waits for character strings (via an idle function). When a string arrives, it is parsed into an action which is usually a call to a User Interface callback function. Is there someone in your organization who has done any work with sockets?

Haroon
03-20-2012, 02:09 PM
Im looking to send data from iphone app to desktop OpenGL application using sockets connection. e.g. location of texture,

I have the opengl application running, and a socket application for desktop and iphone where I can send the data. But I'm not sure how to combine the sockets application and opengl application for desktop. could you please advise?