Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Offscreen-only GL context

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2006
    Location
    Moscow, Russia
    Posts
    23

    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.

  2. #2
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,979

    Re: Offscreen-only GL context

    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

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2006
    Location
    Moscow, Russia
    Posts
    23

    Re: Offscreen-only GL context

    Thanks for information...

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,768

    Re: Offscreen-only GL context

    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.

  5. #5
    Member Regular Contributor
    Join Date
    May 2002
    Posts
    273

    Re: Offscreen-only GL context

    Originally posted by Korval:
    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.
    Why make app, that otherwise would be perfectly portable, have to include code paths for handling separately Windows, Mac and Linux windows systems?

  6. #6
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,142

    Re: Offscreen-only GL context

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •