快速交换帧缓冲区 OpenGL
我最近读到,简单地切换帧缓冲区对象的渲染目标比切换帧缓冲区对象要快得多。
尽管听起来很极端,但这是否意味着我应该只使用一个帧缓冲区对象并且只切换它的目标?
编辑:我将“交换”更改为“切换”以避免混淆。我所说的切换是指绑定一个新的帧缓冲区来代替旧的帧缓冲区。不要与用于交换前缓冲区和后缓冲区的 SwapBuffers() 调用混淆。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑:这个答案可能是错误的。阅读下面的评论。
切换可附加帧缓冲区的纹理比在帧缓冲区 (FBO) 之间切换更快。更多这里http://www.songho.ca/opengl/gl_fbo.html
有不过,FBO 可以拥有的附件数量受到限制。
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.