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

Thread: composing layers

  1. #1
    Guest

    composing layers

    I'm writing an application in openGL, and I thought of a method to optimise my drawing. Basically I will have to compose three layers.
    - 1 : this layer will contain only colors with alpha = 1
    - 2 : this one will also contain transparant and semitransparent colors.
    - 3 : same as two.

    Right before calling SwapBuffers, I would then compose these three layers to form the final render. If I do it this way, I can easyly update only (parts of) the first layer, and get the desired output without having to rerender (parts of) the 2nd and 3rd layer. Also when nothing has to be redrawn, I should only compose the layers again and call SwapBuffers.

    My question is : Is there a way to do this with openGL ? I've read about the accumulation buffer, but I don't know if I could do it like that.

    Does anyone know how I could get my method to work ?

    Thanks in advance.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: composing layers

    accumulation buffer is rarely useful on consumer cards anyway.
    The ideal way is framebuffer objects (FBO) if it is supported on your hardware.

    That way you render to hidden framebuffers, then composite these as textures.

Posting Permissions

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