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

前端 未结 4 874

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

4条回答
  •  长情又很酷
    2021-01-30 09:37

    I want to highlight something.

    FBO it not memory block. I think it look like struct of pointer. You Must attach Texture to FBO to use it. After attach Texture you now can draw to it for offscreen render or for second pass effect.

    struct FBO{
    AttachColor0 *ptr0;
    AttachColor1 *ptr1;
    AttachColor2 *ptr2;
    AttachDepth  *ptr3;
    };
    

    In the other hand, PBO is memory block "block to hold type of memory. "Try to think of it as malloc of x size, then you can use memcpy to copy data from it to texture/FBO or to it".

    • Why to use PBO?

    Create intermediate memory buffer to interface with Host memory and not stop OpenGL drawing will upload texture to or from host.

提交回复
热议问题