FBO Render buffer vs Texture. When to use each?
Hi All,
I noticed OpenGL has this idea of render buffers as well as textures, but you can to both using FBOs.. So I'm just wondering if I can get a good explaination on when to use a buffer and when to use a texture.
For example, if I want to have a depth buffer to use in an FBO, I can create a depth/stencil render buffer or I can create a depth/stencil texture. I can't see the difference except that the texture can be bound and used as a shadow-map or whatever in a shader. So the real question is what is the advantage of a render buffer in lieu of the lack of functionality as a texture.
My first guess would be that you can copy out of it easier. Is that it?
Cheers!
Eric
I'm not exactly sure how to answer your questions, but you can probably get some answers by looking at the official documentation of the framebuffer object extension (GL_EXT_framebuffer_object) here:
http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt
http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt
Good point about AA.
Yeah I've read over the spec in the past but when I looked recently I couldn't find where it said why you would use one over the other.
Yeah I've read over the spec in the past but when I looked recently I couldn't find where it said why you would use one over the other.
You should say what you intend to do.
If you want a Render TO Texture feature, use FBO and of course, you have to attach a texture to the FBO.
The other option is to use a simple texture and glCopyTexSubImage but that's only good if you already have something in your frame buffer. This is useful in other circumstances.
PS : AA is not supported on older GPUs like Radeon 9700 and such + FBO.
If you want a Render TO Texture feature, use FBO and of course, you have to attach a texture to the FBO.
The other option is to use a simple texture and glCopyTexSubImage but that's only good if you already have something in your frame buffer. This is useful in other circumstances.
PS : AA is not supported on older GPUs like Radeon 9700 and such + FBO.
Quote:Original post by V-man
You should say what you intend to do.
If you want a Render TO Texture feature, use FBO and of course, you have to attach a texture to the FBO.
The other option is to use a simple texture and glCopyTexSubImage but that's only good if you already have something in your frame buffer. This is useful in other circumstances.
PS : AA is not supported on older GPUs like Radeon 9700 and such + FBO.
That's interesting.
I have a Radeon 9700 pro, and according to GLee, it supports GL_EXT_framebuffer_multisample and GL_EXT_framebuffer_blit. But I am having trouble attaching a multisampled render bufffer to a fbo. The error message is INCOMPLETE ATTACHMENT. I wonder if it's 9700's problem. It is fine if the render buffer is not multisampled.
>>Yeah I've read over the spec in the past but when I looked recently I couldn't find where it said why you would use one over the other.
use RB whenever possible cause they have possible benifits of being faster/less memory, u also have biltFB (which enables fast blitting between FBO's, with resizing possible with colorFBOs)
of course if u need the resulting image as a texture u have no option but to bind a texture to it + not use a RB
use RB whenever possible cause they have possible benifits of being faster/less memory, u also have biltFB (which enables fast blitting between FBO's, with resizing possible with colorFBOs)
of course if u need the resulting image as a texture u have no option but to bind a texture to it + not use a RB
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement