PDA

View Full Version : Remote OpenGL



yooyo
02-12-2007, 05:59 AM
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?

RigidBody
02-12-2007, 06:49 AM
if both systems are *ix, you can use the example on this page (http://www.opengl.org/wiki/index.php/Programming_OpenGL_in_Linux:_GLX_and_Xlib)

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.

yooyo
02-12-2007, 07:28 AM
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.

Overmind
02-12-2007, 08:20 AM
I don't know about your custom made hardware, but using OpenGL without operating system won't be easy ;)

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".

yooyo
02-12-2007, 11:34 AM
I know that.. What do you think about this:
http://www.3dlabs.com/content/productOverview.asp

Overmind
02-13-2007, 01:10 AM
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 ;)

yooyo
02-13-2007, 05:52 AM
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.

Carburettor
02-18-2007, 08:45 PM
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.