What are the differences between a Frame Buffer Object and a Pixel Buffer Object in OpenGL?

前端 未结 4 867

What is the difference between FBO and PBO? Which one should I use for off-screen rendering?

4条回答
  •  闹比i
    闹比i (楼主)
    2021-01-30 09:30

    What is the difference between FBO and PBO?

    A better question is how are they similar. The only thing that is similar about them is their names.

    A Framebuffer Object (note the capitalization: framebuffer is one word, not two) is an object that contains multiple images which can be used as render targets.

    A Pixel Buffer Object is:

    1. A Buffer Object. FBOs are not buffer objects. Again: framebuffer is one word.
    2. A buffer object that is used for asynchronous uploading/downloading of pixel data to/from images.

    If you want to render to a texture or just a non-screen framebuffer, then you use FBOs. If you're trying to read pixel data back to your application asynchronously, or you're trying to transfer pixel data to OpenGL images asynchronously, then you use PBOs.

    They're nothing alike.

提交回复
热议问题