Hannesh
Hannesh

Reputation: 7488

Fast swapping framebuffers OpenGL

I recently read that simply switching the render targets of a framebuffer object is much faster than switching framebuffer object.

As extreme as it sounds, does this this mean I should only ever use one framebuffer object and only switchout it's targets?

EDIT: I changed 'swapping' to 'switching' to avoid confusion. By switching I mean binding a new framebuffer in place of the old one. Not to be confused with the SwapBuffers() call used to swap the front- and backbuffers.

Upvotes: 0

Views: 5746

Answers (1)

matejd
matejd

Reputation: 144

EDIT: this answer is probably wrong. Read the comments below.

It's faster to switch framebuffer-attachable textures than switching between framebuffers (FBOs). More here http://www.songho.ca/opengl/gl_fbo.html

There are limits to how many attachments a FBO can have though.

Upvotes: 3

Related Questions