Offscreen-only GL context

As GPGPU becomes more and more popular, it is becomes used in applications, which are very far from any graphics or 3D rendering. However, although applications themselves do not need 3D rendering, they need a GL context for GPGPU computations (to send commands and data and get results from the GPU). These may even be some command-line applications, which do not have a window to create context at at all.

So why not allow creating and using a context which is not associated with a particular window? Such a context will be, surely, usable only with off-screen rendering (so it requires FBO to become a standard feature). By the way, DirectX (as I know) also lacks this feature.

You can do this with glx on linux. Windows has no means to do this because you somehow need to identify the device - this is done with a “typical” dc

Thanks for information…

Having a context with no intrinsic framebuffer has actual graphics related uses. So I wouldn’t be against such a thing on general principle .

However, is it really that much of a problem to just spawn a small window and never show it? Since you’re not rendering to the intrinsic framebuffer anyway, it’s not hurting you to do this. Command-line applications can spawn windows just like other kinds of apps.

Originally posted by Korval:
[b] Having a context with no intrinsic framebuffer has actual graphics related uses. So I wouldn’t be against such a thing on general principle .

However, is it really that much of a problem to just spawn a small window and never show it? Since you’re not rendering to the intrinsic framebuffer anyway, it’s not hurting you to do this. Command-line applications can spawn windows just like other kinds of apps. [/b]
Why make app, that otherwise would be perfectly portable, have to include code paths for handling separately Windows, Mac and Linux windows systems?

The problem is that you somehow have to tell OpenGL what device to use for rendering, even when it’s only for offscreen rendering. And there is no platform independant way of selecting a piece of hardware.

If you want your application to be platform independant, just use some library that abstracts the platform details away.