Remote OpenGL

This is not OpenGL programming question… it’s a more about possibility to use OpenGL in a specific way.

I need to do some research about using opengl on remote host. Idea is to have OpenGL application on computer 1 and OpenGL renderer (server) on computer 2 (different OS & hardware). Im wondering is there some solution for this or I have to do this by myself. Computer 2 will have hw accelerated graphics.

Can someone explain what is GLX and is it possible to use it for my needs?

if both systems are *ix, you can use the example on this page

you just have to change the line, in which the connection to the x server is established:

dpy = XOpenDisplay(NULL);

has to be changed to

dpy = XOpenDisplay("remote_host:0.0");

where remote_host has to be the appropriate hostname. the extension “:0.0” is mandatory; it adresses the graphics card.

Thanx for link.

Computer 1 can be *nix or Windows, but Computer 2 will be custom made hardware. Im just researching for possibilities to “stream” opengl calls from comp 1 to comp 2.

I don’t know about your custom made hardware, but using OpenGL without operating system won’t be easy :wink:

Seriously, your best option is to install some X server on Computer 2. There are X servers for most operating systems (even windows). On computer 1 you just need the X client libraries (also available on all platforms).

For the remode rendering, you can do it like RigidBody suggested, or just set the DISPLAY environment variable to “remote_host:0.0”.

I know that… What do you think about this:

Ok, this thing runs OpenGL ES.

I don’t think there is an equivalent to GLX for GL ES, but I don’t know GL ES very well, so I may be wrong :wink:

OK… Im thinking to implement my own OpenGL ES on comp 1 and it will just stream commands to comp 2. I can go closest as possible to GLX protocol, but I can add some changes, even extend it a bit.

If you want to do it by yourself understanding GLX protocol might be very hard so i suggest try a client-server implementation like this;
On the client side you can write OpenGLAPI stubs which basically converts each function to simple messages.(You can enumarate OpenGLAPIs and messages can be like opcode+parameters)
On the server side you can take this messages and call generic OpenGLAPIs with coming parameters.
If you want to make multi application clients you have to be careful when calling makeCurrents and protecting the command order.