开发者

Fast swapping framebuffers OpenGL

开发者 https://www.devze.com 2023-03-07 19:25 出处:网络
I recently read that simply switching the render targets of a framebuffer object is much faster than switching framebuffer object.

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 SwapBuf开发者_开发技巧fers() call used to swap the front- and backbuffers.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消