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: FBO 2nd & 3rd render targets not drawing

  1. #1
    Intern Newbie
    Join Date
    Feb 2010
    Posts
    39

    FBO 2nd & 3rd render targets not drawing

    My search-fu isn't the best so apologies if this has already been clearly covered somewhere.

    I'm trying to get multiple render targets working. As the title indicates, I'm having no luck getting anything written to the 2nd or 3rd COLOR_ATTACHMENTs.

    A few quick questions, when answered will probably help me out:

    1. Is it necessary to call glBindFragDataLocation? If so, should it be called before or after linking the shader program?

    2. Is it necessary to call glDrawBuffers? If so, is there a prescribed point at which it should be called? e.g. before of or after the call to glBindFramebuffer?

    3. Is it necessary to call glDrawBuffer( GL_BACK ) when preparing to render to the default window's back buffer? If so, like #2 should it be called before or after glBindFrameBuffer( GL_FRAMEBUFFER, 0 )?

    4. The 3.1 spec indicates that GL_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER are to be treated the same. Should one be preferred over the other?

    Thanks.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,726

    Re: FBO 2nd & 3rd render targets not drawing

    Is it necessary to call glBindFragDataLocation? If so, should it be called before or after linking the shader program?
    See Here.

    Is it necessary to call glDrawBuffers? If so, is there a prescribed point at which it should be called? e.g. before of or after the call to glBindFramebuffer?
    See Here.

    The 3.1 spec indicates that GL_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER are to be treated the same. Should one be preferred over the other?
    I prefer to be more specific. GL_FRAMEBUFFER is a legacy enumerator, and to be honest, I wish they hadn't used it in the ARB_framebuffer_objects extension/core functionality.

Posting Permissions

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