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 4 of 4

Thread: Rendering to buffer for off-line storage

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2007
    Location
    Paris, France
    Posts
    2

    Rendering to buffer for off-line storage

    Hello,

    In my application, at some point I'd like to use OpenGL to fill a framebuffer that I want to have saved. Performances doesn't matter, but I need to ensure that my scene is rendered properly and not overlapped by some other operating system window.

    glReadPixels() on my regular GL context doesn't seems to ensure that, eg: on a command-line version of my tool, I often get windows garbage over my buffer. What I'd like to do eventually is to render directly into RAM.

    Are PBuffer the solution?
    Anything easier?
    It is possible via Windows/WGL (sorry this isn't stricly a GL question, then) to create a DC that doesn't map to the screen but to RAM?

    I'm running Windows XP, Radeon 9800 if that matter.

    Thanks,
    Omar

  2. #2
    Intern Contributor
    Join Date
    Feb 2005
    Location
    Israel
    Posts
    84

    Re: Rendering to buffer for off-line storage

    Hi,

    PBuffer could be used but they are obsolete and replaced by the FBO extension.
    Check Google for off-screen rendering.

    Ido
    Ido Ilan

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

    Re: Rendering to buffer for off-line storage

    As Ido said, use the GL_EXT_framebuffer_object extension (just in case you didn't know what FBO is). The specification in the registry has a small usage example at the end that is usually enough to get started.

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2007
    Location
    Paris, France
    Posts
    2

    Re: Rendering to buffer for off-line storage

    Thanks for your answers.
    How's the hardware/driver support for FBO?
    Since when are those decently supported by hardware and/or drivers?
    Want to make sure that 2-3 y/o hardware won't get stuck due to FBO usage.

Posting Permissions

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