How do I get the best performance when transferring data to and from OpenGL pixel buffer objects (PBOs)?
For optimal performance when copying data to and from PBOs, you should make sure that the format of the source data is compatible with the format of the destination. This will ensure that the driver doesn’t have to do any format conversion on the CPU and can do a direct copy in video memory. When copying 8-bit color data from the framebuffer using glReadPixels we recommend using the GL_BGRA format and ensuring that the framebuffer has an alpha channel (e.g. glutInitDisplayMode(GLUT_RGBA_ | GLUT_ALPHA) if you’re using GLUT).
Related Questions
- How do I get the best performance when transferring data to and from OpenGL pixel buffer objects (PBOs)?
- How can I create an image from a buffer of raw image data (red, green, and blue values for each pixel)?
- Whats the best way of transferring data (e.g. music, games, photosetc) onto my mmc from my computer?