OpenGL Over a Network

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?



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 ( 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).

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.

One of the easiest ways:

ssh -X remotecomputer
run application


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, [url=]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.

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.

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?

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?