Sign in to follow this  
c-mos

OpenGL confused about fbo attachment points

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this