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

Thread: rendering into a bitmap

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2009
    Posts
    3

    rendering into a bitmap

    I need to define a generic OpenGL interface for a project that will be ported to multiple architectures. I.E. Win32, Linux, X86, ARM11, etc.

    The issue is how to interface to external wrapper programs, and I believe that building a generic bitmap might be the method, wherein I render to the bitmap, and the application can overwrite it with fonts, other bitmaps, etc.

    I'm fairly sure this can be done somehow in most architectures, but can it be done using hardware speedup?

    Thanks much for the help!

  2. #2
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,370

    Re: rendering into a bitmap

    but can it be done using hardware speedup?
    Why not? Use MVC architecture (Model View Controller). With this architecture, the way data is represented and how it is displayed is completely decoupled. Following this idea, you can define various kind of viewer, hw accelerated or not.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2009
    Posts
    3

    Re: rendering into a bitmap

    Quote Originally Posted by dletozeun
    but can it be done using hardware speedup?
    Why not? Use MVC architecture (Model View Controller). With this architecture, the way data is represented and how it is displayed is completely decoupled. Following this idea, you can define various kind of viewer, hw accelerated or not.
    Logically, I have no doubt it can be done somehow. But how well will it work, and the HW angle I don't know.

    My biggest lack of knowledge is the capabilities of the various drivers, which I'm not likely to discover by any quick method except by asking here.

    There can be OpenGL rendering into a buffer and then the buffer swapped onto the display. But I'm a bit more fuzzy about rendering onto the buffer with HW speedup, and then moving that buffer (a bitmap of some sort) into foreground space for the application to do it's will.

    Can I count on this being available on pretty much any platform?

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2009
    Posts
    3

    Re: rendering into a bitmap

    Let me add something here.

    Implied is that we need to render into a back buffer, and never swap it to the front buffer using OpenGL. Rather instead we need to hand it off to a wrapper application, that will modify the bitmap and display it at its leisure.

  5. #5
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,370

    Re: rendering into a bitmap

    I am not sure to fully understand your problem, but OpenGL offers the ability to render to a buffer or even a texture through the framebuffer_object extension. With this one you can perform hw accelerated offline rendering and display it in your viewer.
    I think you have to read a bit on OpenGL, just to have first a global idea of how it works. Then read about the fbo extension, for example here:
    http://www.gamedev.net/reference/art...rticle2331.asp
    http://oss.sgi.com/projects/ogl-samp...fer_object.txt

Posting Permissions

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