Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: textures with pbo's

  1. #1
    Junior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    127

    textures with pbo's

    Hi there,
    I have a question about the use of PBOs with textures. I have seen in an open source engine that they use a PBO for each texture. That means operations like update will be performed by
    PBO. Is this ok ? I mean setting up and using a PBO has some overhead, right ?

    regards,
    lobbel

  2. #2
    Junior Member Regular Contributor
    Join Date
    Nov 2010
    Location
    Brazil, Rio de Janeiro
    Posts
    147

    Re: textures with pbo's

    The only significant overhead is when using PBOs is to copy data from client to the server. If, the engine you're talking about use different PBOs but they are set once, there's no significant overhead.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,718

    Re: textures with pbo's

    I have seen in an open source engine that they use a PBO for each texture.
    Do you mean that each texture has its own buffer object? Because that would be a terrible idea.

  4. #4
    Junior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    127

    Re: textures with pbo's

    Yes,
    a buffer is genereated whenever e new textures has been created.
    That's why I am asking wether this is a good idea or not.
    As far as I know there is a lot of overhead with respect to buffer objects.

    regards,
    lobbel

  5. #5
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,718

    Re: textures with pbo's

    As far as I know there is a lot of overhead with respect to buffer objects.
    It's not about overhead with respect to buffer objects. It's about not doing something pointless.

    Using Pixel Buffer Objects means that you're using a buffer object as the source or destination for a pixel transfer operation. That is, you put pixel data, possibly loaded from a file, into a buffer. Then you do a glTexSubImage from that buffer object into a texture. After the pixel transfer operation completes (sometime after the glTexSubImage call returns), you have no further need for the buffer object anymore.

    There is no permanent association between the buffer object and the texture object. The buffer object does not represent the content of the texture. So there's no point in having a separate buffer object for every texture.

    In general, it's better to have a small set of PBOs around, and simply pick whichever one was least recently used.

  6. #6
    Junior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    127

    Re: textures with pbo's

    Hello,
    thanks for your answer, that makes sense.

    regards,
    lobbel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •