confused about fbo attachment points

Started by
5 comments, last by Yann L 14 years, 1 month ago
Hello there, the FBO has the color attachment points followed by a depth attachment point and a stencil attachment point. usually when you want rendering to a texture you use a 2d texture attached to the color attachment point and if depth testing needed you may also need to attach a render buffer to the depth attachment point. http://www.songho.ca/opengl/gl_fbo.html at this page, the picture shows that it is also possible to connect a renderbuffer to a color attachment point. is that right ? i thought only textures are allowed to attach to the color attachment points. what is it good for ? its not possible to bind the results from the renderbuffer to a texture or to a shader variable. regards, c-mos
Advertisement
ok, i just read again the papers from simon green (gc 2006) introducing the
new fbo. the picture there shows, it's not possible to bind the renderbuffer
to the color attachments but you can attach texture to the depth attachment point.

regards,
c-mos
YES, you can attach a renderbuffer to a color attachment point.
Ok thanks, but what is it good for ?
To me it make sense connection a renderbuffer to the
depth attachment point or stencil attachment point. but
what is it good for connecting a renderbuffer to a
color attachment point ?

regards,
c-mos
You can do multisampling, and blit to the main framebuffer, etc.
Oh, havn't done multisampling before. good to know how to do it.
usually I use the fbo/rbo only for render-to-texture purpose and
such simple usage (scientific use).

regards,
c-mos
You are correct that the usages scenarios for binding a render buffer to a colour attachment are rather limited. In most cases, a texture will be more effective and flexible. However, as HuntsMan said, until recently doing MSAA with an FBO required a multisampled colour renderbuffer to be used (which would subsequently be resolved with a blit to a texture, for example).

However, it is now also possible to attach multisampled textures to an FBO directly, although this may or may not have performance implications depending on the implementation.

This topic is closed to new replies.

Advertisement