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: switching fbo rendering: fastest way ?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    France
    Posts
    134

    switching fbo rendering: fastest way ?

    Hello

    What is the fastest:
    -switching multiple FBO (with one texture for each) using glBindFramebufferEXT()
    or
    -switching associated texture (with only one FBO) using glFramebufferTexture2DEXT() ?

    The result seems the same to me, but I wonder if one method has performance impact compared to the other..

    thanks !

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    748

    Re: switching fbo rendering: fastest way ?

    I don't think so, not a lot anyway.
    Theoreticly they should be the same, but i could be horribly wrong.

  3. #3
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,444

    Re: switching fbo rendering: fastest way ?

    Use glBindFramebufferEXT. That's the reason why we have a model using objects. Each object contains a complete state that can be prevalidated to some degree. For current hardware the difference may be relatively small, but for future hardware I would expect the difference to be bigger. It may not be immediately obvious, but FBO is structured in a way that's somewhat similar to how DX10 handles render target states. Of course, if the bottleneck is rendering it probably won't matter.

  4. #4
    Junior Member Regular Contributor Roderic (Ingenu)'s Avatar
    Join Date
    Mar 2000
    Location
    Horsham, West Sussex, UK.
    Posts
    161

    Re: switching fbo rendering: fastest way ?

    I use glBindFramebufferEXT because it's how the extension is meant to be used, just like you don't reload your texture objects content but bind different textures, you should use extensions in the spirit they are given. (And so the spirit in which the IHV will optimise their drivers.)

    Well my 0.02€
    -* So many things to do, so little time to spend. *-

  5. #5
    Junior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    France
    Posts
    134

    Re: switching fbo rendering: fastest way ?

    Ok, I was asking that because my render scheme is a ping-pong between 2 textures (more than 6 pass) and I didn't saw the needs for numerous FBO if I could just switch the texture binding of one. So I'll create 2 FBO and attach each one a texture, and switch FBO context during my ping-pong...

    However another part of my rendering process need to write to different mipmap level.. This time I won't able to escape the texture switch inside the FBO.

Posting Permissions

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