PDA

View Full Version : headless render server



col.corto
05-28-2012, 09:32 AM
On a linux server (gentoo, running xeon quad-core) that doesn't have a video card at all, how would I get to use opengl to create images and save them to disk? Can you point to some reference online? recommend reading some specific man pages? I'm sure this is a common question, but couldn't find an answer for it (perhaps not the right google keywords?)...


To be more specific, assuming the following steps are already working fine for a desktop application, what additions or changes do I need to consider on the headless server?

1) the graphic renders in a clean "by-the-book" manner, only uses features available on average GPUs
2) the graphic displays perfectly on the desktop application, on any average GPUs
2) I am able to read the pixels from the buffer
3) I am able to write the pixels to some image format on disk (like PNG).

I know for a fact that the biggest change is there won't be a GPU. I think Mesa will be used as software driver. But I have no idea about rendering contexts, framebuffers bindings (as there won't be a window), how the pipeline will work, if there are specific initialisations to do (or to avoid), etc...

Simon

menzel
05-28-2012, 11:42 AM
Hello Simon,

i've written here: http://renderingpipeline.com/2012/05/windowless-opengl/ how to set up a windowless OpenGLcontext and here: http://renderingpipeline.com/2012/05/remote-opengl/ how to start programs remotely to run on the remote GPU. Note however that i assume an existing GPU and a connected display! To get an OpenGL context on linux, you use calls to X11, so without a XServer running, you might have problems. If you get an X running with Mesa software OpenGL, let me know! But if that works, the above sources might help (and watch your DISPLAY variable in case you SSH to that machine and start your app, you could end up rendering the GL part on your local desktop...).
Maybe linking directly to a plain software OpenGL implementation is the way to go (i'm not aware of a useful one).
as a look into the future: NVidia seems to be working on remore rendering on there GK110 chips, e.g. for remote desktops or game streaming but that requires a GPU (that will be available Q4 2012...)

What is the exact goal you want to achieve?