Jump to content
  • Advertisement
Sign in to follow this  
rvx

OpenGL PBO FBO TBO?

This topic is 3231 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

can someone explain to me what is the difference between Pixel Buffer Object : http://www.opengl.org/registry/specs/ARB/pixel_buffer_object.txt Frame Buffer Object : http://www.opengl.org/registry/specs/EXT/framebuffer_object.txt Texture Buffer Object : http://www.opengl.org/registry/specs/EXT/texture_buffer_object.txt where's the best situation (and case example) to use each buffer?

Share this post


Link to post
Share on other sites
Advertisement
PBOs are used for async data upload. You can store pixel data in a buffer (which is mostly stored in video memory) and later use it for commands that read/write pixel data, such as glReadPixels, glTexImage1D/2D/3D, etc.

FBOs are used for offscreen rendering and multiple render targets. You can draw to a texture or an renderbuffer. You can later read that texture in a shader to do things like postprocessing.

TBOs just allow to read a buffer object as a texture in a shader. The backing store of the texture is the buffer object data, so it's pretty generic on what it can be done with it.

Share this post


Link to post
Share on other sites
Quote:
Original post by HuntsMan
PBOs are used for async data upload. You can store pixel data in a buffer (which is mostly stored in video memory) and later use it for commands that read/write pixel data, such as glReadPixels, glTexImage1D/2D/3D, etc.

so it is used for writing pixel data to a texture, and later on the texture could be used by shader.

Quote:
FBOs are used for offscreen rendering and multiple render targets. You can draw to a texture or an renderbuffer. You can later read that texture in a shader to do things like postprocessing.

so it is mostly used for rendering to texture, ok i got it.

Quote:
TBOs just allow to read a buffer object as a texture in a shader. The backing store of the texture is the buffer object data, so it's pretty generic on what it can be done with it.

in this case the difference between TBO and PBO is, TBO make it possible that any data could be treated as a texture on shader (such as vertex position, vertex normal, indices, vertex attribs anything that stored on a buffer object), and PBO is a more specific buffer that only hold pixel data.

because its a specific buffer for pixel data, then one of its important feature is we could use opengl pixel manipulation function on it.

am I right?



Share this post


Link to post
Share on other sites
Quote:
Original post by HuntsMan
Yes. TBO's can only be read by shaders, but PBOs can be used by other GL functions.


we still could use MapBuffer function to read and write to TBO isn't it?

Share this post


Link to post
Share on other sites
if I want to build a GUI system, which is using Cairo to render it, which one is best using PBO or TBO since i don't need GL pixel manipulation, no mipmaping and no texture filtering just RGBA buffer. performance-wise?

Share this post


Link to post
Share on other sites
Quote:
Original post by V-man
I think you don't need any of them. You can just render to the backbuffer.
This says it can do GL rendering
http://en.wikipedia.org/wiki/Cairo_(graphics)


if I render to backbuffer i won't have flexibility for compositing floating/cascading window or widget, transparency, animation etc (like Compiz). and every pixel on the screen should be redraw each frame, unlike using quad texture for each surface of Cairo i can only draw which surface has changed.

Share this post


Link to post
Share on other sites
Quote:
Original post by rvx
Quote:
Original post by V-man
I think you don't need any of them. You can just render to the backbuffer.
This says it can do GL rendering
http://en.wikipedia.org/wiki/Cairo_(graphics)


if I render to backbuffer i won't have flexibility for compositing floating/cascading window or widget, transparency, animation etc (like Compiz). and every pixel on the screen should be redraw each frame, unlike using quad texture for each surface of Cairo i can only draw which surface has changed.


I don't know what you mean by compositing floating/cascading window but I have done a GUI system that draws windows and other controls and it renders to the backbuffer. I just need to do a code review some day.

Perhaps you should use FBO if you don't intend to update some of those windows. This is called RTT = render to texture
http://www.opengl.org/wiki/OpenGL_extensions#Framebuffer_related_extensions

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!