View Full Version : OpenGL rendering in background

Peter Breuer
07-29-2004, 12:28 AM

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

07-29-2004, 12:41 AM
Check out PBuffers which are offscreen rendering targets. A simple readpixels and you're set :)

07-29-2004, 03:17 AM
Pbuffers will not work, since they require a context. Your only option is to use mesa3d, which will work without a context (osmesa).

Peter Breuer
07-29-2004, 04:03 AM

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

Kilam Malik
07-29-2004, 04:41 AM
Originally posted by Peter Breuer:

Mesa is a software OpenGL renderer?
We need hardware acceleration.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.


Peter Breuer
07-29-2004, 07:00 AM
Which graphics cards are supports pbuffer under Linux?

07-30-2004, 08:58 PM
Check out:

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