OpenGL rendering in background


It is possible to use OpenGL without any window manager (e.g. not
attaching to a drawing context with wglsetcurrent/glxsetcurrent)?
We need background rendering without user interface. The generated images
are copied from the display buffer and postprocessed by our app.

How to do this? Which OpenGL settings needed to enable background rendering?

Best regards,
Peter Breuer

Check out PBuffers which are offscreen rendering targets. A simple readpixels and you’re set :slight_smile:

Pbuffers will not work, since they require a context. Your only option is to use mesa3d, which will work without a context (osmesa).


Mesa is a software OpenGL renderer?
We need hardware acceleration.

Originally posted by Peter Breuer:

Mesa is a software OpenGL renderer?
We need hardware acceleration.[/b]
If you need hardware acceleration then you have a problem. It is possible to use a bitmap as rendering context, but it will be software mode too. With hardware acceleration you can only draw on the screen. If you think of using a hidden window, you have the next problem: The window is not allowed to be hidden if you want to read the RGB values after rendering. The parts that are hidden wont get rendered.
Can PBuffers be rendered hidden? Then it is your solution. I think you are only looking for a solution that can be hidden from the user. Shouldnt be a problem if it uses a context.


Which graphics cards are supports pbuffer under Linux?

Check out:

They have a matrix of hardware supported features by card brand/model.