I have a PBO that updates every CUDA frame. After that, I also want to update the texture using this PBO, which I use with glTexSubImage2d
. I am afraid that updating the entire texture will be expensive and I would like to update only the visible area of ββthe texture, while my PBO has all the data on it.
The problem is that although glTexSubImage2d
accepts the offset, width, and height values ββas parameters, they are only used when painting the texture, while I still need buffer data that needs to be linearly laid. I'm afraid that preparing buffer data might be too expensive (in fact, it would be very expensive, since my PBO is in the GPU's memory.)
Is there an alternative to glTexSubImage2d
that also accepts parameters for buffer offsets, or do I need to constantly update the entire texture?
source share