Using PBOs when memory address is already fixed?

55 views Asked by At

I'm trying to optimize the upload of textures from CPU memory to OpenGL.

Initially I was using glTexImage2D and that works, but obviously isn't using DMA, so I'm trying to use PBOs.

Unfortunately, the API I have to use that provides the texture data allocates the CPU memory for them and returns a pointer. I can't control where in memory it places the data.

If I create a PBO then map it, I have to either 'manually' move my data into the PBO-allocated memory, or use glBufferData to initialize it with the texture data before calling glTexImage2D. This appears significantly slower than not using a PBO at all.

Any other techniques I could try, or is this just a limitation of how PBO's work?

0

There are 0 answers