PBO improves performance?


I have modified the PBO unpack code supplied in here, to have multiple textures all connected to its individual PBO. However when I test the code with and without PBO it turns out that without PBO gives better performance.

My modifications on the code are pretty straight forwards. I only changed these three variables to arrays

GLuint pboIds[numFrames];                   // IDs of PBO
GLuint textureId[numFrames];                   // ID of texture
GLubyte* imageData[numFrames];             // pointer to texture buffer

and read each PBO to corresponding texture and update PBO s in a for loop. However when you switch off the usage of PBO by pressing ‘space’ you see the copy time is reduced.

So I wonder why the performance is poor with PBOs. In my project I need to display multiple videos on the screen should I not use PBOs?

My XCode project is in

AmI missing some thing.


Generally what people miss with PBOs is that they free up the CPU to do extra work. If you don’t do any extra work, then you won’t get the benefit - you’re just using a different transfer mechanism.

There’s also some pixel format requirements to look at. If you don’t have a pixel format that can be transferred without CPU help, you won’t get asynchronous transfers either.


Note: see the OpenGL Wiki article on the subject for further details.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.